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.
- package/README.md +34 -6
- package/bin/zexus +12 -2
- package/bin/zpics +12 -2
- package/bin/zpm +12 -2
- package/bin/zx +12 -2
- package/bin/zx-deploy +12 -2
- package/bin/zx-dev +12 -2
- package/bin/zx-run +12 -2
- package/package.json +2 -1
- package/rust_core/Cargo.lock +603 -0
- package/rust_core/Cargo.toml +26 -0
- package/rust_core/README.md +15 -0
- package/rust_core/pyproject.toml +25 -0
- package/rust_core/src/binary_bytecode.rs +543 -0
- package/rust_core/src/contract_vm.rs +643 -0
- package/rust_core/src/executor.rs +847 -0
- package/rust_core/src/hasher.rs +90 -0
- package/rust_core/src/lib.rs +71 -0
- package/rust_core/src/merkle.rs +128 -0
- package/rust_core/src/rust_vm.rs +2313 -0
- package/rust_core/src/signature.rs +79 -0
- package/rust_core/src/state_adapter.rs +281 -0
- package/rust_core/src/validator.rs +116 -0
- package/scripts/postinstall.js +204 -21
- package/src/zexus/__init__.py +1 -1
- package/src/zexus/cli/main.py +1 -1
- package/src/zexus/cli/zpm.py +1 -1
- package/src/zexus/evaluator/bytecode_compiler.py +150 -52
- package/src/zexus/evaluator/core.py +151 -809
- package/src/zexus/evaluator/expressions.py +27 -22
- package/src/zexus/evaluator/functions.py +171 -126
- package/src/zexus/evaluator/statements.py +55 -112
- package/src/zexus/module_cache.py +20 -9
- package/src/zexus/object.py +330 -38
- package/src/zexus/parser/parser.py +103 -23
- package/src/zexus/parser/strategy_context.py +318 -6
- package/src/zexus/parser/strategy_structural.py +2 -2
- package/src/zexus/persistence.py +46 -17
- package/src/zexus/security.py +140 -234
- package/src/zexus/type_checker.py +44 -5
- package/src/zexus/vm/binary_bytecode.py +7 -3
- package/src/zexus/vm/bytecode.py +6 -0
- package/src/zexus/vm/cache.py +24 -46
- package/src/zexus/vm/compiler.py +549 -68
- package/src/zexus/vm/memory_pool.py +21 -9
- package/src/zexus/vm/vm.py +609 -95
- package/src/zexus/zpm/package_manager.py +1 -1
- package/src/zexus.egg-info/PKG-INFO +56 -12
- package/src/zexus.egg-info/SOURCES.txt +14 -0
- package/src/zexus.egg-info/entry_points.txt +5 -1
- 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
|
-

|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://python.org)
|
|
8
8
|
[](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.
|
|
70
|
+
## 🎉 What's New in v1.8.1
|
|
71
71
|
|
|
72
|
-
### Latest Features (v1.8.
|
|
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
|
-
|
|
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
|
|
607
|
-
zpm --version
|
|
634
|
+
zx --version
|
|
635
|
+
zpm --version
|
|
608
636
|
```
|
|
609
637
|
|
|
610
638
|
---
|
package/bin/zexus
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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.
|
|
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",
|