zexus 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +34 -6
  2. package/bin/zexus +12 -2
  3. package/bin/zpics +12 -2
  4. package/bin/zpm +12 -2
  5. package/bin/zx +12 -2
  6. package/bin/zx-deploy +12 -2
  7. package/bin/zx-dev +12 -2
  8. package/bin/zx-run +12 -2
  9. package/package.json +2 -1
  10. package/rust_core/Cargo.lock +603 -0
  11. package/rust_core/Cargo.toml +26 -0
  12. package/rust_core/README.md +15 -0
  13. package/rust_core/pyproject.toml +25 -0
  14. package/rust_core/src/binary_bytecode.rs +543 -0
  15. package/rust_core/src/contract_vm.rs +643 -0
  16. package/rust_core/src/executor.rs +847 -0
  17. package/rust_core/src/hasher.rs +90 -0
  18. package/rust_core/src/lib.rs +71 -0
  19. package/rust_core/src/merkle.rs +128 -0
  20. package/rust_core/src/rust_vm.rs +2313 -0
  21. package/rust_core/src/signature.rs +79 -0
  22. package/rust_core/src/state_adapter.rs +281 -0
  23. package/rust_core/src/validator.rs +116 -0
  24. package/scripts/postinstall.js +204 -21
  25. package/src/zexus/__init__.py +1 -1
  26. package/src/zexus/cli/main.py +1 -1
  27. package/src/zexus/cli/zpm.py +1 -1
  28. package/src/zexus/evaluator/bytecode_compiler.py +150 -52
  29. package/src/zexus/evaluator/core.py +151 -809
  30. package/src/zexus/evaluator/expressions.py +27 -22
  31. package/src/zexus/evaluator/functions.py +171 -126
  32. package/src/zexus/evaluator/statements.py +55 -112
  33. package/src/zexus/module_cache.py +20 -9
  34. package/src/zexus/object.py +330 -38
  35. package/src/zexus/parser/parser.py +103 -23
  36. package/src/zexus/parser/strategy_context.py +318 -6
  37. package/src/zexus/parser/strategy_structural.py +2 -2
  38. package/src/zexus/persistence.py +46 -17
  39. package/src/zexus/security.py +140 -234
  40. package/src/zexus/type_checker.py +44 -5
  41. package/src/zexus/vm/binary_bytecode.py +7 -3
  42. package/src/zexus/vm/bytecode.py +6 -0
  43. package/src/zexus/vm/cache.py +24 -46
  44. package/src/zexus/vm/compiler.py +549 -68
  45. package/src/zexus/vm/memory_pool.py +21 -9
  46. package/src/zexus/vm/vm.py +609 -95
  47. package/src/zexus/zpm/package_manager.py +1 -1
  48. package/src/zexus.egg-info/PKG-INFO +56 -12
  49. package/src/zexus.egg-info/SOURCES.txt +14 -0
  50. package/src/zexus.egg-info/entry_points.txt +5 -1
  51. package/src/zexus.egg-info/requires.txt +26 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.8.0-FF6B35?style=for-the-badge)
5
+ ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.8.1-FF6B35?style=for-the-badge)
6
6
  [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)
7
7
  [![Python](https://img.shields.io/badge/Python-3.8+-3776AB?style=for-the-badge&logo=python)](https://python.org)
8
8
  [![GitHub](https://img.shields.io/badge/GitHub-Zaidux/zexus--interpreter-181717?style=for-the-badge&logo=github)](https://github.com/Zaidux/zexus-interpreter)
@@ -67,9 +67,9 @@ Zexus is a next-generation, general-purpose programming language designed for se
67
67
 
68
68
  ---
69
69
 
70
- ## 🎉 What's New in v1.8.0
70
+ ## 🎉 What's New in v1.8.1
71
71
 
72
- ### Latest Features (v1.8.0)
72
+ ### Latest Features (v1.8.1)
73
73
 
74
74
  ✅ **FIND Keyword** - Declarative project search that resolves exact module paths with scope filtering and smart suggestions
75
75
  ✅ **LOAD Keyword & Manager** - Provider-aware configuration loader with built-in ENV, JSON, and YAML support plus caching
@@ -588,6 +588,22 @@ verify balance >= amount {
588
588
  pip install zexus
589
589
  ```
590
590
 
591
+ ### Full Install (Blockchain + Networking + Security Helpers)
592
+
593
+ ```bash
594
+ pip install "zexus[full]"
595
+ ```
596
+
597
+ ### Install Matrix
598
+
599
+ | Goal | Command | Notes |
600
+ |---|---|---|
601
+ | Minimal (interpreter + CLI) | `pip install zexus` | Pure-Python install. |
602
+ | Full runtime features | `pip install "zexus[full]"` | Installs optional deps for blockchain/network/security helpers. |
603
+ | From source | `./install.sh` | Installs `.[full]` and attempts Rust VM build when `cargo` exists. |
604
+ | Optional Rust VM (`zexus_core`) | `pip install maturin && maturin develop -m rust_core/Cargo.toml --release` | Requires Rust toolchain; otherwise Zexus falls back automatically. |
605
+ | Node/npm distribution | `npm i zexus` | Runs `pip install --user "zexus[full]"` and best-effort builds `zexus_core` if Rust is available. |
606
+
591
607
  **Includes:**
592
608
  - `zx` - Main Zexus CLI
593
609
  - `zpm` - Zexus Package Manager
@@ -597,14 +613,26 @@ pip install zexus
597
613
  ```bash
598
614
  git clone https://github.com/Zaidux/zexus-interpreter.git
599
615
  cd zexus-interpreter
600
- pip install -e .
616
+ ./install.sh
617
+
618
+ # Or, directly via pip:
619
+ pip install -e ".[full]"
620
+ ```
621
+
622
+ ### Optional: Enable Rust VM (`zexus_core`)
623
+
624
+ If you have a Rust toolchain installed (`cargo` on PATH), you can build the Rust VM extension from source:
625
+
626
+ ```bash
627
+ pip install maturin
628
+ maturin develop -m rust_core/Cargo.toml --release
601
629
  ```
602
630
 
603
631
  ### Verify Installation
604
632
 
605
633
  ```bash
606
- zx --version # Should show: Zexus v1.6.3
607
- zpm --version # Should show: ZPM v1.6.3
634
+ zx --version
635
+ zpm --version
608
636
  ```
609
637
 
610
638
  ---
package/bin/zexus CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zpics CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus.pics "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus.pics', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zpm CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus.zpm "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus.zpm', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zx CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zx-deploy CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus.deploy "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus.deploy', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zx-dev CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus.dev "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus.dev', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/bin/zx-run CHANGED
@@ -1,2 +1,12 @@
1
- #!/usr/bin/env bash
2
- python3 -m zexus.runner "$@"
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const proc = spawn('python3', ['-m', 'zexus.runner', ...process.argv.slice(2)], { stdio: 'inherit' });
4
+ proc.on('error', (err) => {
5
+ if (err.code === 'ENOENT') {
6
+ console.error('Error: python3 not found. Please install Python 3.8+ to use Zexus.');
7
+ process.exit(1);
8
+ }
9
+ console.error('Error:', err.message);
10
+ process.exit(1);
11
+ });
12
+ proc.on('close', (code) => process.exit(code ?? 1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zexus",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "A modern, security-first programming language with blockchain support",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -52,6 +52,7 @@
52
52
  "files": [
53
53
  "bin/",
54
54
  "src/",
55
+ "rust_core/",
55
56
  "zexus.json",
56
57
  "shared_config.json",
57
58
  "README.md",