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
|
@@ -23,7 +23,7 @@ class PackageManager:
|
|
|
23
23
|
self.installer = PackageInstaller(self.zpm_dir)
|
|
24
24
|
self.publisher = PackagePublisher(self.registry)
|
|
25
25
|
|
|
26
|
-
def init(self, name: str = None, version: str = "1.8.
|
|
26
|
+
def init(self, name: str = None, version: str = "1.8.2") -> Dict:
|
|
27
27
|
"""Initialize a new Zexus project with package.json"""
|
|
28
28
|
if self.config_file.exists():
|
|
29
29
|
print(f"⚠️ {self.config_file} already exists")
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zexus
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.2
|
|
4
4
|
Summary: A modern, security-first programming language with blockchain support
|
|
5
5
|
Home-page: https://github.com/Zaidux/zexus-interpreter
|
|
6
6
|
Author: Zaidux
|
|
7
7
|
Author-email: Zaidux <zaiduabubakar777@gmail.com>
|
|
8
8
|
Maintainer-email: Zaidux <zaiduabubakar888@gmail.com>
|
|
9
9
|
License: MIT
|
|
10
|
-
Project-URL: Homepage, https://github.com/Zaidux/zexus-interpreter
|
|
11
|
-
Project-URL: Documentation, https://github.com/Zaidux/zexus-interpreter/blob/main/docs/
|
|
12
|
-
Project-URL: Repository, https://github.com/Zaidux/zexus-interpreter
|
|
13
|
-
Project-URL: Issues, https://github.com/Zaidux/zexus-interpreter/issues
|
|
14
|
-
Project-URL: Changelog, https://github.com/Zaidux/zexus-interpreter/blob/main/CHANGELOG.md
|
|
15
10
|
Keywords: programming-language,interpreter,compiler,blockchain,smart-contracts,security,policy-as-code
|
|
16
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -32,6 +27,7 @@ License-File: LICENSE
|
|
|
32
27
|
Requires-Dist: click>=8.0
|
|
33
28
|
Requires-Dist: rich>=10.0
|
|
34
29
|
Requires-Dist: pygls>=1.0.0
|
|
30
|
+
Requires-Dist: pygments>=2.0
|
|
35
31
|
Provides-Extra: dev
|
|
36
32
|
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
37
33
|
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
|
@@ -44,6 +40,26 @@ Requires-Dist: eth-account>=0.5; extra == "blockchain"
|
|
|
44
40
|
Provides-Extra: jit
|
|
45
41
|
Requires-Dist: llvmlite>=0.41.0; extra == "jit"
|
|
46
42
|
Requires-Dist: Cython>=0.29; extra == "jit"
|
|
43
|
+
Provides-Extra: lsp
|
|
44
|
+
Requires-Dist: pygls>=1.0.0; extra == "lsp"
|
|
45
|
+
Provides-Extra: network
|
|
46
|
+
Requires-Dist: websockets>=12.0; extra == "network"
|
|
47
|
+
Requires-Dist: aiohttp>=3.9; extra == "network"
|
|
48
|
+
Requires-Dist: httpx>=0.27; extra == "network"
|
|
49
|
+
Provides-Extra: security
|
|
50
|
+
Requires-Dist: bcrypt>=4.0; extra == "security"
|
|
51
|
+
Requires-Dist: psutil>=5.9; extra == "security"
|
|
52
|
+
Provides-Extra: rust
|
|
53
|
+
Requires-Dist: maturin>=1.5; extra == "rust"
|
|
54
|
+
Provides-Extra: full
|
|
55
|
+
Requires-Dist: web3>=5.0; extra == "full"
|
|
56
|
+
Requires-Dist: eth-account>=0.5; extra == "full"
|
|
57
|
+
Requires-Dist: websockets>=12.0; extra == "full"
|
|
58
|
+
Requires-Dist: aiohttp>=3.9; extra == "full"
|
|
59
|
+
Requires-Dist: httpx>=0.27; extra == "full"
|
|
60
|
+
Requires-Dist: bcrypt>=4.0; extra == "full"
|
|
61
|
+
Requires-Dist: psutil>=5.9; extra == "full"
|
|
62
|
+
Requires-Dist: maturin>=1.5; extra == "full"
|
|
47
63
|
Dynamic: author
|
|
48
64
|
Dynamic: home-page
|
|
49
65
|
Dynamic: license-file
|
|
@@ -53,7 +69,7 @@ Dynamic: requires-python
|
|
|
53
69
|
|
|
54
70
|
<div align="center">
|
|
55
71
|
|
|
56
|
-

|
|
57
73
|
[](LICENSE)
|
|
58
74
|
[](https://python.org)
|
|
59
75
|
[](https://github.com/Zaidux/zexus-interpreter)
|
|
@@ -118,9 +134,9 @@ Zexus is a next-generation, general-purpose programming language designed for se
|
|
|
118
134
|
|
|
119
135
|
---
|
|
120
136
|
|
|
121
|
-
## 🎉 What's New in v1.8.
|
|
137
|
+
## 🎉 What's New in v1.8.1
|
|
122
138
|
|
|
123
|
-
### Latest Features (v1.8.
|
|
139
|
+
### Latest Features (v1.8.1)
|
|
124
140
|
|
|
125
141
|
✅ **FIND Keyword** - Declarative project search that resolves exact module paths with scope filtering and smart suggestions
|
|
126
142
|
✅ **LOAD Keyword & Manager** - Provider-aware configuration loader with built-in ENV, JSON, and YAML support plus caching
|
|
@@ -639,6 +655,22 @@ verify balance >= amount {
|
|
|
639
655
|
pip install zexus
|
|
640
656
|
```
|
|
641
657
|
|
|
658
|
+
### Full Install (Blockchain + Networking + Security Helpers)
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
pip install "zexus[full]"
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### Install Matrix
|
|
665
|
+
|
|
666
|
+
| Goal | Command | Notes |
|
|
667
|
+
|---|---|---|
|
|
668
|
+
| Minimal (interpreter + CLI) | `pip install zexus` | Pure-Python install. |
|
|
669
|
+
| Full runtime features | `pip install "zexus[full]"` | Installs optional deps for blockchain/network/security helpers. |
|
|
670
|
+
| From source | `./install.sh` | Installs `.[full]` and attempts Rust VM build when `cargo` exists. |
|
|
671
|
+
| Optional Rust VM (`zexus_core`) | `pip install maturin && maturin develop -m rust_core/Cargo.toml --release` | Requires Rust toolchain; otherwise Zexus falls back automatically. |
|
|
672
|
+
| Node/npm distribution | `npm i zexus` | Runs `pip install --user "zexus[full]"` and best-effort builds `zexus_core` if Rust is available. |
|
|
673
|
+
|
|
642
674
|
**Includes:**
|
|
643
675
|
- `zx` - Main Zexus CLI
|
|
644
676
|
- `zpm` - Zexus Package Manager
|
|
@@ -648,14 +680,26 @@ pip install zexus
|
|
|
648
680
|
```bash
|
|
649
681
|
git clone https://github.com/Zaidux/zexus-interpreter.git
|
|
650
682
|
cd zexus-interpreter
|
|
651
|
-
|
|
683
|
+
./install.sh
|
|
684
|
+
|
|
685
|
+
# Or, directly via pip:
|
|
686
|
+
pip install -e ".[full]"
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### Optional: Enable Rust VM (`zexus_core`)
|
|
690
|
+
|
|
691
|
+
If you have a Rust toolchain installed (`cargo` on PATH), you can build the Rust VM extension from source:
|
|
692
|
+
|
|
693
|
+
```bash
|
|
694
|
+
pip install maturin
|
|
695
|
+
maturin develop -m rust_core/Cargo.toml --release
|
|
652
696
|
```
|
|
653
697
|
|
|
654
698
|
### Verify Installation
|
|
655
699
|
|
|
656
700
|
```bash
|
|
657
|
-
zx --version
|
|
658
|
-
zpm --version
|
|
701
|
+
zx --version
|
|
702
|
+
zpm --version
|
|
659
703
|
```
|
|
660
704
|
|
|
661
705
|
---
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.gitattributes
|
|
2
2
|
.gitignore
|
|
3
|
+
.npmignore
|
|
3
4
|
ADDITIONAL_FIXES_1.6.7.md
|
|
4
5
|
BLOCKCHAIN_MODULE_FULL_SOURCE.md
|
|
5
6
|
CHANGELOG.md
|
|
@@ -24,6 +25,7 @@ SYSTEM_ANALYSIS_FINDINGS.md
|
|
|
24
25
|
UNIFIED_SYSTEM_COMPLETE.md
|
|
25
26
|
VM_DEEP_DIVE_TRACKING.md
|
|
26
27
|
VM_KEYWORD_SUPPORT_REPORT.md
|
|
28
|
+
VULNERABILITIES_FIXES.md
|
|
27
29
|
VULNERABILITY_FINDINGS.md
|
|
28
30
|
VULNERABILITY_TEST_RESULTS.md
|
|
29
31
|
ZEXUS_BLOCKCHAIN_REFERENCE.md
|
|
@@ -164,18 +166,25 @@ bin/zx-dev
|
|
|
164
166
|
bin/zx-run
|
|
165
167
|
blockchain_demo/address_prefix.zx
|
|
166
168
|
blockchain_demo/dex.zx
|
|
169
|
+
blockchain_demo/dex.zxc
|
|
167
170
|
blockchain_demo/governance.zx
|
|
171
|
+
blockchain_demo/governance.zxc
|
|
168
172
|
blockchain_demo/main.zx
|
|
169
173
|
blockchain_demo/multichain_bridge.zx
|
|
170
174
|
blockchain_demo/nft.zx
|
|
175
|
+
blockchain_demo/nft.zxc
|
|
171
176
|
blockchain_demo/staking.zx
|
|
177
|
+
blockchain_demo/staking.zxc
|
|
172
178
|
blockchain_demo/test_import_closure.zx
|
|
173
179
|
blockchain_demo/test_module.zx
|
|
174
180
|
blockchain_demo/test_utils_import.zx
|
|
175
181
|
blockchain_demo/test_utils_import2.zx
|
|
176
182
|
blockchain_demo/token.zx
|
|
183
|
+
blockchain_demo/token.zxc
|
|
177
184
|
blockchain_demo/utils.zx
|
|
185
|
+
blockchain_demo/utils.zxc
|
|
178
186
|
blockchain_demo/wallet.zx
|
|
187
|
+
blockchain_demo/wallet.zxc
|
|
179
188
|
blockchain_test/PARSER_FIX_DATA_DECLARATIONS.md
|
|
180
189
|
blockchain_test/PERFORMANCE_ANALYSIS.md
|
|
181
190
|
blockchain_test/PERFORMANCE_FINAL_REPORT.md
|
|
@@ -474,6 +483,7 @@ issues/ISSUE3.md
|
|
|
474
483
|
issues/ISSUE4.md
|
|
475
484
|
issues/ISSUE5.md
|
|
476
485
|
issues/ISSUE6.md
|
|
486
|
+
issues/ISSUE7.md
|
|
477
487
|
issues/ISSUSE1.md
|
|
478
488
|
issues/tests/test_issue5.zx
|
|
479
489
|
linguist-submission/SUBMISSION_INSTRUCTIONS.md
|
|
@@ -485,6 +495,8 @@ linguist-submission/samples/blockchain.zx
|
|
|
485
495
|
linguist-submission/samples/security.zx
|
|
486
496
|
rust_core/Cargo.lock
|
|
487
497
|
rust_core/Cargo.toml
|
|
498
|
+
rust_core/README.md
|
|
499
|
+
rust_core/pyproject.toml
|
|
488
500
|
rust_core/src/binary_bytecode.rs
|
|
489
501
|
rust_core/src/contract_vm.rs
|
|
490
502
|
rust_core/src/executor.rs
|
|
@@ -801,8 +813,10 @@ tests/fixtures/print_one.zx
|
|
|
801
813
|
tests/fixtures/use_import.zx
|
|
802
814
|
tests/fixtures/use_only.zx
|
|
803
815
|
tests/fixtures/modules/a.zx
|
|
816
|
+
tests/fixtures/modules/a.zxc
|
|
804
817
|
tests/fixtures/modules/b.zx
|
|
805
818
|
tests/fixtures/modules/mathmod.zx
|
|
819
|
+
tests/fixtures/modules/mathmod.zxc
|
|
806
820
|
tests/golden/README.md
|
|
807
821
|
tests/golden/function_calls_after_let.zx
|
|
808
822
|
tests/golden/mixed_statement_boundaries.zx
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
click>=8.0
|
|
2
2
|
rich>=10.0
|
|
3
3
|
pygls>=1.0.0
|
|
4
|
+
pygments>=2.0
|
|
4
5
|
|
|
5
6
|
[blockchain]
|
|
6
7
|
web3>=5.0
|
|
@@ -13,6 +14,31 @@ black>=21.0
|
|
|
13
14
|
flake8>=3.9
|
|
14
15
|
mypy>=0.900
|
|
15
16
|
|
|
17
|
+
[full]
|
|
18
|
+
web3>=5.0
|
|
19
|
+
eth-account>=0.5
|
|
20
|
+
websockets>=12.0
|
|
21
|
+
aiohttp>=3.9
|
|
22
|
+
httpx>=0.27
|
|
23
|
+
bcrypt>=4.0
|
|
24
|
+
psutil>=5.9
|
|
25
|
+
maturin>=1.5
|
|
26
|
+
|
|
16
27
|
[jit]
|
|
17
28
|
llvmlite>=0.41.0
|
|
18
29
|
Cython>=0.29
|
|
30
|
+
|
|
31
|
+
[lsp]
|
|
32
|
+
pygls>=1.0.0
|
|
33
|
+
|
|
34
|
+
[network]
|
|
35
|
+
websockets>=12.0
|
|
36
|
+
aiohttp>=3.9
|
|
37
|
+
httpx>=0.27
|
|
38
|
+
|
|
39
|
+
[rust]
|
|
40
|
+
maturin>=1.5
|
|
41
|
+
|
|
42
|
+
[security]
|
|
43
|
+
bcrypt>=4.0
|
|
44
|
+
psutil>=5.9
|