zexus 1.7.2 → 1.8.1

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 (49) hide show
  1. package/README.md +57 -6
  2. package/package.json +2 -1
  3. package/rust_core/Cargo.lock +603 -0
  4. package/rust_core/Cargo.toml +26 -0
  5. package/rust_core/README.md +15 -0
  6. package/rust_core/pyproject.toml +25 -0
  7. package/rust_core/src/binary_bytecode.rs +543 -0
  8. package/rust_core/src/contract_vm.rs +643 -0
  9. package/rust_core/src/executor.rs +847 -0
  10. package/rust_core/src/hasher.rs +90 -0
  11. package/rust_core/src/lib.rs +71 -0
  12. package/rust_core/src/merkle.rs +128 -0
  13. package/rust_core/src/rust_vm.rs +2313 -0
  14. package/rust_core/src/signature.rs +79 -0
  15. package/rust_core/src/state_adapter.rs +281 -0
  16. package/rust_core/src/validator.rs +116 -0
  17. package/scripts/postinstall.js +34 -2
  18. package/src/zexus/__init__.py +1 -1
  19. package/src/zexus/blockchain/accelerator.py +27 -0
  20. package/src/zexus/blockchain/contract_vm.py +409 -3
  21. package/src/zexus/blockchain/rust_bridge.py +64 -0
  22. package/src/zexus/cli/main.py +1 -1
  23. package/src/zexus/cli/zpm.py +1 -1
  24. package/src/zexus/evaluator/bytecode_compiler.py +150 -52
  25. package/src/zexus/evaluator/core.py +151 -809
  26. package/src/zexus/evaluator/expressions.py +27 -22
  27. package/src/zexus/evaluator/functions.py +171 -126
  28. package/src/zexus/evaluator/statements.py +55 -112
  29. package/src/zexus/module_cache.py +20 -9
  30. package/src/zexus/object.py +330 -38
  31. package/src/zexus/parser/parser.py +69 -14
  32. package/src/zexus/parser/strategy_context.py +228 -5
  33. package/src/zexus/parser/strategy_structural.py +2 -2
  34. package/src/zexus/persistence.py +46 -17
  35. package/src/zexus/security.py +140 -234
  36. package/src/zexus/type_checker.py +44 -5
  37. package/src/zexus/vm/binary_bytecode.py +7 -3
  38. package/src/zexus/vm/bytecode.py +6 -0
  39. package/src/zexus/vm/cache.py +24 -46
  40. package/src/zexus/vm/compiler.py +80 -20
  41. package/src/zexus/vm/fastops.c +1093 -2975
  42. package/src/zexus/vm/gas_metering.py +2 -2
  43. package/src/zexus/vm/memory_pool.py +21 -9
  44. package/src/zexus/vm/vm.py +527 -67
  45. package/src/zexus/zpm/package_manager.py +1 -1
  46. package/src/zexus.egg-info/PKG-INFO +79 -12
  47. package/src/zexus.egg-info/SOURCES.txt +23 -1
  48. package/src/zexus.egg-info/requires.txt +26 -0
  49. package/src/zexus.egg-info/entry_points.txt +0 -4
@@ -0,0 +1,603 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "base16ct"
13
+ version = "0.2.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
16
+
17
+ [[package]]
18
+ name = "base64ct"
19
+ version = "1.8.3"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
22
+
23
+ [[package]]
24
+ name = "block-buffer"
25
+ version = "0.10.4"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
28
+ dependencies = [
29
+ "generic-array",
30
+ ]
31
+
32
+ [[package]]
33
+ name = "cfg-if"
34
+ version = "1.0.4"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
37
+
38
+ [[package]]
39
+ name = "const-oid"
40
+ version = "0.9.6"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
43
+
44
+ [[package]]
45
+ name = "cpufeatures"
46
+ version = "0.2.17"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
49
+ dependencies = [
50
+ "libc",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "crossbeam-deque"
55
+ version = "0.8.6"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
58
+ dependencies = [
59
+ "crossbeam-epoch",
60
+ "crossbeam-utils",
61
+ ]
62
+
63
+ [[package]]
64
+ name = "crossbeam-epoch"
65
+ version = "0.9.18"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
68
+ dependencies = [
69
+ "crossbeam-utils",
70
+ ]
71
+
72
+ [[package]]
73
+ name = "crossbeam-utils"
74
+ version = "0.8.21"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
77
+
78
+ [[package]]
79
+ name = "crunchy"
80
+ version = "0.2.4"
81
+ source = "registry+https://github.com/rust-lang/crates.io-index"
82
+ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
83
+
84
+ [[package]]
85
+ name = "crypto-bigint"
86
+ version = "0.5.5"
87
+ source = "registry+https://github.com/rust-lang/crates.io-index"
88
+ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
89
+ dependencies = [
90
+ "generic-array",
91
+ "rand_core",
92
+ "subtle",
93
+ "zeroize",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "crypto-common"
98
+ version = "0.1.6"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
101
+ dependencies = [
102
+ "generic-array",
103
+ "typenum",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "der"
108
+ version = "0.7.10"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
111
+ dependencies = [
112
+ "const-oid",
113
+ "zeroize",
114
+ ]
115
+
116
+ [[package]]
117
+ name = "digest"
118
+ version = "0.10.7"
119
+ source = "registry+https://github.com/rust-lang/crates.io-index"
120
+ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
121
+ dependencies = [
122
+ "block-buffer",
123
+ "const-oid",
124
+ "crypto-common",
125
+ "subtle",
126
+ ]
127
+
128
+ [[package]]
129
+ name = "ecdsa"
130
+ version = "0.16.9"
131
+ source = "registry+https://github.com/rust-lang/crates.io-index"
132
+ checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
133
+ dependencies = [
134
+ "der",
135
+ "digest",
136
+ "elliptic-curve",
137
+ "rfc6979",
138
+ "signature",
139
+ "spki",
140
+ ]
141
+
142
+ [[package]]
143
+ name = "either"
144
+ version = "1.15.0"
145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
146
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
147
+
148
+ [[package]]
149
+ name = "elliptic-curve"
150
+ version = "0.13.8"
151
+ source = "registry+https://github.com/rust-lang/crates.io-index"
152
+ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
153
+ dependencies = [
154
+ "base16ct",
155
+ "crypto-bigint",
156
+ "digest",
157
+ "ff",
158
+ "generic-array",
159
+ "group",
160
+ "pkcs8",
161
+ "rand_core",
162
+ "sec1",
163
+ "subtle",
164
+ "zeroize",
165
+ ]
166
+
167
+ [[package]]
168
+ name = "ff"
169
+ version = "0.13.1"
170
+ source = "registry+https://github.com/rust-lang/crates.io-index"
171
+ checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
172
+ dependencies = [
173
+ "rand_core",
174
+ "subtle",
175
+ ]
176
+
177
+ [[package]]
178
+ name = "generic-array"
179
+ version = "0.14.9"
180
+ source = "registry+https://github.com/rust-lang/crates.io-index"
181
+ checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
182
+ dependencies = [
183
+ "typenum",
184
+ "version_check",
185
+ "zeroize",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "getrandom"
190
+ version = "0.2.17"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
193
+ dependencies = [
194
+ "cfg-if",
195
+ "libc",
196
+ "wasi",
197
+ ]
198
+
199
+ [[package]]
200
+ name = "group"
201
+ version = "0.13.0"
202
+ source = "registry+https://github.com/rust-lang/crates.io-index"
203
+ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
204
+ dependencies = [
205
+ "ff",
206
+ "rand_core",
207
+ "subtle",
208
+ ]
209
+
210
+ [[package]]
211
+ name = "heck"
212
+ version = "0.5.0"
213
+ source = "registry+https://github.com/rust-lang/crates.io-index"
214
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
215
+
216
+ [[package]]
217
+ name = "hex"
218
+ version = "0.4.3"
219
+ source = "registry+https://github.com/rust-lang/crates.io-index"
220
+ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
221
+
222
+ [[package]]
223
+ name = "hmac"
224
+ version = "0.12.1"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
227
+ dependencies = [
228
+ "digest",
229
+ ]
230
+
231
+ [[package]]
232
+ name = "indoc"
233
+ version = "2.0.7"
234
+ source = "registry+https://github.com/rust-lang/crates.io-index"
235
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
236
+ dependencies = [
237
+ "rustversion",
238
+ ]
239
+
240
+ [[package]]
241
+ name = "itoa"
242
+ version = "1.0.17"
243
+ source = "registry+https://github.com/rust-lang/crates.io-index"
244
+ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
245
+
246
+ [[package]]
247
+ name = "k256"
248
+ version = "0.13.4"
249
+ source = "registry+https://github.com/rust-lang/crates.io-index"
250
+ checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b"
251
+ dependencies = [
252
+ "cfg-if",
253
+ "ecdsa",
254
+ "elliptic-curve",
255
+ "once_cell",
256
+ "sha2",
257
+ "signature",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "libc"
262
+ version = "0.2.182"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112"
265
+
266
+ [[package]]
267
+ name = "memchr"
268
+ version = "2.8.0"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
271
+
272
+ [[package]]
273
+ name = "memoffset"
274
+ version = "0.9.1"
275
+ source = "registry+https://github.com/rust-lang/crates.io-index"
276
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
277
+ dependencies = [
278
+ "autocfg",
279
+ ]
280
+
281
+ [[package]]
282
+ name = "once_cell"
283
+ version = "1.21.3"
284
+ source = "registry+https://github.com/rust-lang/crates.io-index"
285
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
286
+
287
+ [[package]]
288
+ name = "pkcs8"
289
+ version = "0.10.2"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
292
+ dependencies = [
293
+ "der",
294
+ "spki",
295
+ ]
296
+
297
+ [[package]]
298
+ name = "portable-atomic"
299
+ version = "1.13.1"
300
+ source = "registry+https://github.com/rust-lang/crates.io-index"
301
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
302
+
303
+ [[package]]
304
+ name = "proc-macro2"
305
+ version = "1.0.106"
306
+ source = "registry+https://github.com/rust-lang/crates.io-index"
307
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
308
+ dependencies = [
309
+ "unicode-ident",
310
+ ]
311
+
312
+ [[package]]
313
+ name = "pyo3"
314
+ version = "0.22.6"
315
+ source = "registry+https://github.com/rust-lang/crates.io-index"
316
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
317
+ dependencies = [
318
+ "cfg-if",
319
+ "indoc",
320
+ "libc",
321
+ "memoffset",
322
+ "once_cell",
323
+ "portable-atomic",
324
+ "pyo3-build-config",
325
+ "pyo3-ffi",
326
+ "pyo3-macros",
327
+ "unindent",
328
+ ]
329
+
330
+ [[package]]
331
+ name = "pyo3-build-config"
332
+ version = "0.22.6"
333
+ source = "registry+https://github.com/rust-lang/crates.io-index"
334
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
335
+ dependencies = [
336
+ "once_cell",
337
+ "target-lexicon",
338
+ ]
339
+
340
+ [[package]]
341
+ name = "pyo3-ffi"
342
+ version = "0.22.6"
343
+ source = "registry+https://github.com/rust-lang/crates.io-index"
344
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
345
+ dependencies = [
346
+ "libc",
347
+ "pyo3-build-config",
348
+ ]
349
+
350
+ [[package]]
351
+ name = "pyo3-macros"
352
+ version = "0.22.6"
353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
354
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
355
+ dependencies = [
356
+ "proc-macro2",
357
+ "pyo3-macros-backend",
358
+ "quote",
359
+ "syn",
360
+ ]
361
+
362
+ [[package]]
363
+ name = "pyo3-macros-backend"
364
+ version = "0.22.6"
365
+ source = "registry+https://github.com/rust-lang/crates.io-index"
366
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
367
+ dependencies = [
368
+ "heck",
369
+ "proc-macro2",
370
+ "pyo3-build-config",
371
+ "quote",
372
+ "syn",
373
+ ]
374
+
375
+ [[package]]
376
+ name = "quote"
377
+ version = "1.0.44"
378
+ source = "registry+https://github.com/rust-lang/crates.io-index"
379
+ checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
380
+ dependencies = [
381
+ "proc-macro2",
382
+ ]
383
+
384
+ [[package]]
385
+ name = "rand_core"
386
+ version = "0.6.4"
387
+ source = "registry+https://github.com/rust-lang/crates.io-index"
388
+ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
389
+ dependencies = [
390
+ "getrandom",
391
+ ]
392
+
393
+ [[package]]
394
+ name = "rayon"
395
+ version = "1.11.0"
396
+ source = "registry+https://github.com/rust-lang/crates.io-index"
397
+ checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
398
+ dependencies = [
399
+ "either",
400
+ "rayon-core",
401
+ ]
402
+
403
+ [[package]]
404
+ name = "rayon-core"
405
+ version = "1.13.0"
406
+ source = "registry+https://github.com/rust-lang/crates.io-index"
407
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
408
+ dependencies = [
409
+ "crossbeam-deque",
410
+ "crossbeam-utils",
411
+ ]
412
+
413
+ [[package]]
414
+ name = "rfc6979"
415
+ version = "0.4.0"
416
+ source = "registry+https://github.com/rust-lang/crates.io-index"
417
+ checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
418
+ dependencies = [
419
+ "hmac",
420
+ "subtle",
421
+ ]
422
+
423
+ [[package]]
424
+ name = "rustversion"
425
+ version = "1.0.22"
426
+ source = "registry+https://github.com/rust-lang/crates.io-index"
427
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
428
+
429
+ [[package]]
430
+ name = "sec1"
431
+ version = "0.7.3"
432
+ source = "registry+https://github.com/rust-lang/crates.io-index"
433
+ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
434
+ dependencies = [
435
+ "base16ct",
436
+ "der",
437
+ "generic-array",
438
+ "pkcs8",
439
+ "subtle",
440
+ "zeroize",
441
+ ]
442
+
443
+ [[package]]
444
+ name = "serde"
445
+ version = "1.0.228"
446
+ source = "registry+https://github.com/rust-lang/crates.io-index"
447
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
448
+ dependencies = [
449
+ "serde_core",
450
+ "serde_derive",
451
+ ]
452
+
453
+ [[package]]
454
+ name = "serde_core"
455
+ version = "1.0.228"
456
+ source = "registry+https://github.com/rust-lang/crates.io-index"
457
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
458
+ dependencies = [
459
+ "serde_derive",
460
+ ]
461
+
462
+ [[package]]
463
+ name = "serde_derive"
464
+ version = "1.0.228"
465
+ source = "registry+https://github.com/rust-lang/crates.io-index"
466
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
467
+ dependencies = [
468
+ "proc-macro2",
469
+ "quote",
470
+ "syn",
471
+ ]
472
+
473
+ [[package]]
474
+ name = "serde_json"
475
+ version = "1.0.149"
476
+ source = "registry+https://github.com/rust-lang/crates.io-index"
477
+ checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
478
+ dependencies = [
479
+ "itoa",
480
+ "memchr",
481
+ "serde",
482
+ "serde_core",
483
+ "zmij",
484
+ ]
485
+
486
+ [[package]]
487
+ name = "sha2"
488
+ version = "0.10.9"
489
+ source = "registry+https://github.com/rust-lang/crates.io-index"
490
+ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
491
+ dependencies = [
492
+ "cfg-if",
493
+ "cpufeatures",
494
+ "digest",
495
+ ]
496
+
497
+ [[package]]
498
+ name = "signature"
499
+ version = "2.2.0"
500
+ source = "registry+https://github.com/rust-lang/crates.io-index"
501
+ checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
502
+ dependencies = [
503
+ "digest",
504
+ "rand_core",
505
+ ]
506
+
507
+ [[package]]
508
+ name = "spki"
509
+ version = "0.7.3"
510
+ source = "registry+https://github.com/rust-lang/crates.io-index"
511
+ checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
512
+ dependencies = [
513
+ "base64ct",
514
+ "der",
515
+ ]
516
+
517
+ [[package]]
518
+ name = "subtle"
519
+ version = "2.6.1"
520
+ source = "registry+https://github.com/rust-lang/crates.io-index"
521
+ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
522
+
523
+ [[package]]
524
+ name = "syn"
525
+ version = "2.0.117"
526
+ source = "registry+https://github.com/rust-lang/crates.io-index"
527
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
528
+ dependencies = [
529
+ "proc-macro2",
530
+ "quote",
531
+ "unicode-ident",
532
+ ]
533
+
534
+ [[package]]
535
+ name = "target-lexicon"
536
+ version = "0.12.16"
537
+ source = "registry+https://github.com/rust-lang/crates.io-index"
538
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
539
+
540
+ [[package]]
541
+ name = "tiny-keccak"
542
+ version = "2.0.2"
543
+ source = "registry+https://github.com/rust-lang/crates.io-index"
544
+ checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
545
+ dependencies = [
546
+ "crunchy",
547
+ ]
548
+
549
+ [[package]]
550
+ name = "typenum"
551
+ version = "1.19.0"
552
+ source = "registry+https://github.com/rust-lang/crates.io-index"
553
+ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
554
+
555
+ [[package]]
556
+ name = "unicode-ident"
557
+ version = "1.0.24"
558
+ source = "registry+https://github.com/rust-lang/crates.io-index"
559
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
560
+
561
+ [[package]]
562
+ name = "unindent"
563
+ version = "0.2.4"
564
+ source = "registry+https://github.com/rust-lang/crates.io-index"
565
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
566
+
567
+ [[package]]
568
+ name = "version_check"
569
+ version = "0.9.5"
570
+ source = "registry+https://github.com/rust-lang/crates.io-index"
571
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
572
+
573
+ [[package]]
574
+ name = "wasi"
575
+ version = "0.11.1+wasi-snapshot-preview1"
576
+ source = "registry+https://github.com/rust-lang/crates.io-index"
577
+ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
578
+
579
+ [[package]]
580
+ name = "zeroize"
581
+ version = "1.8.2"
582
+ source = "registry+https://github.com/rust-lang/crates.io-index"
583
+ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
584
+
585
+ [[package]]
586
+ name = "zexus_core"
587
+ version = "0.4.0"
588
+ dependencies = [
589
+ "hex",
590
+ "k256",
591
+ "pyo3",
592
+ "rayon",
593
+ "serde",
594
+ "serde_json",
595
+ "sha2",
596
+ "tiny-keccak",
597
+ ]
598
+
599
+ [[package]]
600
+ name = "zmij"
601
+ version = "1.0.21"
602
+ source = "registry+https://github.com/rust-lang/crates.io-index"
603
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -0,0 +1,26 @@
1
+ [package]
2
+ name = "zexus_core"
3
+ version = "0.4.0"
4
+ edition = "2021"
5
+ description = "High-performance Rust execution core for the Zexus blockchain"
6
+ license = "MIT"
7
+
8
+ [lib]
9
+ name = "zexus_core"
10
+ crate-type = ["cdylib"]
11
+
12
+ [dependencies]
13
+ pyo3 = { version = "0.22", features = ["extension-module"] }
14
+ sha2 = "0.10"
15
+ rayon = "1.10"
16
+ serde = { version = "1", features = ["derive"] }
17
+ serde_json = "1"
18
+ hex = "0.4"
19
+ k256 = { version = "0.13", features = ["ecdsa", "sha256"] }
20
+ tiny-keccak = { version = "2", features = ["keccak"] }
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ strip = true
@@ -0,0 +1,15 @@
1
+ # zexus-core
2
+
3
+ This directory contains the optional Rust execution core for Zexus, exposed to Python as the `zexus_core` module via PyO3.
4
+
5
+ ## Build (from this repo)
6
+
7
+ Requirements:
8
+ - Python 3.8+
9
+ - Rust toolchain (`cargo`)
10
+
11
+ Commands:
12
+ - `python -m pip install -U maturin`
13
+ - `python -m maturin develop -m rust_core/Cargo.toml --release`
14
+
15
+ If the extension is not available, Zexus falls back to the pure-Python VM automatically.
@@ -0,0 +1,25 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.5,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "zexus-core"
7
+ version = "0.4.0"
8
+ description = "High-performance Rust execution core for the Zexus blockchain (PyO3 extension)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Zaidux" }
14
+ ]
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Rust",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ]
21
+
22
+ [tool.maturin]
23
+ module-name = "zexus_core"
24
+ manifest-path = "Cargo.toml"
25
+ features = ["pyo3/extension-module"]