rusty-lang 0.1.0__tar.gz
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.
- rusty_lang-0.1.0/Cargo.lock +462 -0
- rusty_lang-0.1.0/Cargo.toml +3 -0
- rusty_lang-0.1.0/LICENSE +22 -0
- rusty_lang-0.1.0/PKG-INFO +203 -0
- rusty_lang-0.1.0/README.md +182 -0
- rusty_lang-0.1.0/pyproject.toml +35 -0
- rusty_lang-0.1.0/rusty-cli/Cargo.toml +22 -0
- rusty_lang-0.1.0/rusty-cli/README.md +182 -0
- rusty_lang-0.1.0/rusty-cli/src/main.rs +247 -0
- rusty_lang-0.1.0/rusty-core/Cargo.toml +22 -0
- rusty_lang-0.1.0/rusty-core/README.md +182 -0
- rusty_lang-0.1.0/rusty-core/build.rs +154 -0
- rusty_lang-0.1.0/rusty-core/src/ast.rs +216 -0
- rusty_lang-0.1.0/rusty-core/src/cache/mod.rs +51 -0
- rusty_lang-0.1.0/rusty-core/src/ffi.rs +201 -0
- rusty_lang-0.1.0/rusty-core/src/lexer.rs +451 -0
- rusty_lang-0.1.0/rusty-core/src/lib.rs +47 -0
- rusty_lang-0.1.0/rusty-core/src/memory/arena.rs +84 -0
- rusty_lang-0.1.0/rusty-core/src/memory/lazy_iter.rs +71 -0
- rusty_lang-0.1.0/rusty-core/src/memory/mod.rs +7 -0
- rusty_lang-0.1.0/rusty-core/src/memory/value.rs +298 -0
- rusty_lang-0.1.0/rusty-core/src/parser.rs +827 -0
- rusty_lang-0.1.0/rusty-core/src/python/bridge.rs +424 -0
- rusty_lang-0.1.0/rusty-core/src/python/ffi.rs +84 -0
- rusty_lang-0.1.0/rusty-core/src/python/mod.rs +4 -0
- rusty_lang-0.1.0/rusty-core/src/runtime/env.rs +60 -0
- rusty_lang-0.1.0/rusty-core/src/runtime/evaluator.rs +968 -0
- rusty_lang-0.1.0/rusty-core/src/runtime/mod.rs +5 -0
- rusty_lang-0.1.0/rusty-core/src/security.rs +295 -0
- rusty_lang-0.1.0/rusty-core/tests/language_tests.rs +88 -0
- rusty_lang-0.1.0/rusty-core/tests/security_tests.rs +102 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/__init__.py +21 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/__main__.py +5 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/cli.py +25 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/firewall.py +323 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/importer.py +63 -0
- rusty_lang-0.1.0/rusty-py-bridge/rusty_py_bridge/runtime.py +101 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "anstream"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"anstyle",
|
|
12
|
+
"anstyle-parse",
|
|
13
|
+
"anstyle-query",
|
|
14
|
+
"anstyle-wincon",
|
|
15
|
+
"colorchoice",
|
|
16
|
+
"is_terminal_polyfill",
|
|
17
|
+
"utf8parse",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "anstyle"
|
|
22
|
+
version = "1.0.14"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "anstyle-parse"
|
|
28
|
+
version = "1.0.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
|
31
|
+
dependencies = [
|
|
32
|
+
"utf8parse",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "anstyle-query"
|
|
37
|
+
version = "1.1.5"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"windows-sys",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "anstyle-wincon"
|
|
46
|
+
version = "3.0.11"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
49
|
+
dependencies = [
|
|
50
|
+
"anstyle",
|
|
51
|
+
"once_cell_polyfill",
|
|
52
|
+
"windows-sys",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[[package]]
|
|
56
|
+
name = "anyhow"
|
|
57
|
+
version = "1.0.104"
|
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
+
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "block-buffer"
|
|
63
|
+
version = "0.10.4"
|
|
64
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
+
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
|
66
|
+
dependencies = [
|
|
67
|
+
"generic-array",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "cfg-if"
|
|
72
|
+
version = "1.0.4"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "clap"
|
|
78
|
+
version = "4.6.5"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "301b56658598e48f3648647ac6fc887be7e7108eddfa4e9b63fcf3ec58c0cadf"
|
|
81
|
+
dependencies = [
|
|
82
|
+
"clap_builder",
|
|
83
|
+
"clap_derive",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "clap_builder"
|
|
88
|
+
version = "4.6.5"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "94a65403d1a1bd28f7dc68eb8506e8874808ee5eecb59298de588e2e1407a078"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"anstream",
|
|
93
|
+
"anstyle",
|
|
94
|
+
"clap_lex",
|
|
95
|
+
"strsim",
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
[[package]]
|
|
99
|
+
name = "clap_derive"
|
|
100
|
+
version = "4.6.4"
|
|
101
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
102
|
+
checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
|
|
103
|
+
dependencies = [
|
|
104
|
+
"heck",
|
|
105
|
+
"proc-macro2",
|
|
106
|
+
"quote",
|
|
107
|
+
"syn",
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
[[package]]
|
|
111
|
+
name = "clap_lex"
|
|
112
|
+
version = "1.1.0"
|
|
113
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
114
|
+
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
|
|
115
|
+
|
|
116
|
+
[[package]]
|
|
117
|
+
name = "colorchoice"
|
|
118
|
+
version = "1.0.5"
|
|
119
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
120
|
+
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "cpufeatures"
|
|
124
|
+
version = "0.2.17"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
|
127
|
+
dependencies = [
|
|
128
|
+
"libc",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "crypto-common"
|
|
133
|
+
version = "0.1.7"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"generic-array",
|
|
138
|
+
"typenum",
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "digest"
|
|
143
|
+
version = "0.10.7"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
|
146
|
+
dependencies = [
|
|
147
|
+
"block-buffer",
|
|
148
|
+
"crypto-common",
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
[[package]]
|
|
152
|
+
name = "equivalent"
|
|
153
|
+
version = "1.0.2"
|
|
154
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
155
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
156
|
+
|
|
157
|
+
[[package]]
|
|
158
|
+
name = "generic-array"
|
|
159
|
+
version = "0.14.7"
|
|
160
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
+
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
|
162
|
+
dependencies = [
|
|
163
|
+
"typenum",
|
|
164
|
+
"version_check",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[[package]]
|
|
168
|
+
name = "hashbrown"
|
|
169
|
+
version = "0.17.1"
|
|
170
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
171
|
+
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
172
|
+
|
|
173
|
+
[[package]]
|
|
174
|
+
name = "heck"
|
|
175
|
+
version = "0.5.0"
|
|
176
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
177
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
178
|
+
|
|
179
|
+
[[package]]
|
|
180
|
+
name = "indexmap"
|
|
181
|
+
version = "2.14.0"
|
|
182
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
183
|
+
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
|
184
|
+
dependencies = [
|
|
185
|
+
"equivalent",
|
|
186
|
+
"hashbrown",
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
[[package]]
|
|
190
|
+
name = "is_terminal_polyfill"
|
|
191
|
+
version = "1.70.2"
|
|
192
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
194
|
+
|
|
195
|
+
[[package]]
|
|
196
|
+
name = "itoa"
|
|
197
|
+
version = "1.0.18"
|
|
198
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
200
|
+
|
|
201
|
+
[[package]]
|
|
202
|
+
name = "libc"
|
|
203
|
+
version = "0.2.189"
|
|
204
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
205
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
206
|
+
|
|
207
|
+
[[package]]
|
|
208
|
+
name = "memchr"
|
|
209
|
+
version = "2.8.3"
|
|
210
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
+
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
212
|
+
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "once_cell_polyfill"
|
|
215
|
+
version = "1.70.2"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
218
|
+
|
|
219
|
+
[[package]]
|
|
220
|
+
name = "pin-project-lite"
|
|
221
|
+
version = "0.2.17"
|
|
222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
+
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
224
|
+
|
|
225
|
+
[[package]]
|
|
226
|
+
name = "proc-macro2"
|
|
227
|
+
version = "1.0.107"
|
|
228
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
229
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
230
|
+
dependencies = [
|
|
231
|
+
"unicode-ident",
|
|
232
|
+
]
|
|
233
|
+
|
|
234
|
+
[[package]]
|
|
235
|
+
name = "quote"
|
|
236
|
+
version = "1.0.47"
|
|
237
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
238
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
239
|
+
dependencies = [
|
|
240
|
+
"proc-macro2",
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
[[package]]
|
|
244
|
+
name = "rusty-cli"
|
|
245
|
+
version = "0.1.0"
|
|
246
|
+
dependencies = [
|
|
247
|
+
"anyhow",
|
|
248
|
+
"clap",
|
|
249
|
+
"rusty-core",
|
|
250
|
+
"serde_json",
|
|
251
|
+
"tokio",
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
[[package]]
|
|
255
|
+
name = "rusty-core"
|
|
256
|
+
version = "0.1.0"
|
|
257
|
+
dependencies = [
|
|
258
|
+
"serde",
|
|
259
|
+
"serde_json",
|
|
260
|
+
"sha2",
|
|
261
|
+
"tokio",
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
[[package]]
|
|
265
|
+
name = "rusty-pm"
|
|
266
|
+
version = "0.1.0"
|
|
267
|
+
dependencies = [
|
|
268
|
+
"anyhow",
|
|
269
|
+
"clap",
|
|
270
|
+
"serde",
|
|
271
|
+
"serde_json",
|
|
272
|
+
"toml",
|
|
273
|
+
]
|
|
274
|
+
|
|
275
|
+
[[package]]
|
|
276
|
+
name = "serde"
|
|
277
|
+
version = "1.0.229"
|
|
278
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
279
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
280
|
+
dependencies = [
|
|
281
|
+
"serde_core",
|
|
282
|
+
"serde_derive",
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
[[package]]
|
|
286
|
+
name = "serde_core"
|
|
287
|
+
version = "1.0.229"
|
|
288
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
289
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
290
|
+
dependencies = [
|
|
291
|
+
"serde_derive",
|
|
292
|
+
]
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "serde_derive"
|
|
296
|
+
version = "1.0.229"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
299
|
+
dependencies = [
|
|
300
|
+
"proc-macro2",
|
|
301
|
+
"quote",
|
|
302
|
+
"syn",
|
|
303
|
+
]
|
|
304
|
+
|
|
305
|
+
[[package]]
|
|
306
|
+
name = "serde_json"
|
|
307
|
+
version = "1.0.151"
|
|
308
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
309
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
310
|
+
dependencies = [
|
|
311
|
+
"itoa",
|
|
312
|
+
"memchr",
|
|
313
|
+
"serde",
|
|
314
|
+
"serde_core",
|
|
315
|
+
"zmij",
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
[[package]]
|
|
319
|
+
name = "serde_spanned"
|
|
320
|
+
version = "0.6.9"
|
|
321
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
|
+
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
|
|
323
|
+
dependencies = [
|
|
324
|
+
"serde",
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
[[package]]
|
|
328
|
+
name = "sha2"
|
|
329
|
+
version = "0.10.9"
|
|
330
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
+
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
|
332
|
+
dependencies = [
|
|
333
|
+
"cfg-if",
|
|
334
|
+
"cpufeatures",
|
|
335
|
+
"digest",
|
|
336
|
+
]
|
|
337
|
+
|
|
338
|
+
[[package]]
|
|
339
|
+
name = "strsim"
|
|
340
|
+
version = "0.11.1"
|
|
341
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
342
|
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
343
|
+
|
|
344
|
+
[[package]]
|
|
345
|
+
name = "syn"
|
|
346
|
+
version = "3.0.3"
|
|
347
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
348
|
+
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
|
349
|
+
dependencies = [
|
|
350
|
+
"proc-macro2",
|
|
351
|
+
"quote",
|
|
352
|
+
"unicode-ident",
|
|
353
|
+
]
|
|
354
|
+
|
|
355
|
+
[[package]]
|
|
356
|
+
name = "tokio"
|
|
357
|
+
version = "1.53.1"
|
|
358
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
359
|
+
checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
|
|
360
|
+
dependencies = [
|
|
361
|
+
"pin-project-lite",
|
|
362
|
+
"tokio-macros",
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
[[package]]
|
|
366
|
+
name = "tokio-macros"
|
|
367
|
+
version = "2.7.2"
|
|
368
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
369
|
+
checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
|
|
370
|
+
dependencies = [
|
|
371
|
+
"proc-macro2",
|
|
372
|
+
"quote",
|
|
373
|
+
"syn",
|
|
374
|
+
]
|
|
375
|
+
|
|
376
|
+
[[package]]
|
|
377
|
+
name = "toml"
|
|
378
|
+
version = "0.8.2"
|
|
379
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
+
checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
|
|
381
|
+
dependencies = [
|
|
382
|
+
"serde",
|
|
383
|
+
"serde_spanned",
|
|
384
|
+
"toml_datetime",
|
|
385
|
+
"toml_edit",
|
|
386
|
+
]
|
|
387
|
+
|
|
388
|
+
[[package]]
|
|
389
|
+
name = "toml_datetime"
|
|
390
|
+
version = "0.6.3"
|
|
391
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
392
|
+
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
|
|
393
|
+
dependencies = [
|
|
394
|
+
"serde",
|
|
395
|
+
]
|
|
396
|
+
|
|
397
|
+
[[package]]
|
|
398
|
+
name = "toml_edit"
|
|
399
|
+
version = "0.20.2"
|
|
400
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
401
|
+
checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
|
|
402
|
+
dependencies = [
|
|
403
|
+
"indexmap",
|
|
404
|
+
"serde",
|
|
405
|
+
"serde_spanned",
|
|
406
|
+
"toml_datetime",
|
|
407
|
+
"winnow",
|
|
408
|
+
]
|
|
409
|
+
|
|
410
|
+
[[package]]
|
|
411
|
+
name = "typenum"
|
|
412
|
+
version = "1.20.1"
|
|
413
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
414
|
+
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
415
|
+
|
|
416
|
+
[[package]]
|
|
417
|
+
name = "unicode-ident"
|
|
418
|
+
version = "1.0.24"
|
|
419
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
420
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
421
|
+
|
|
422
|
+
[[package]]
|
|
423
|
+
name = "utf8parse"
|
|
424
|
+
version = "0.2.2"
|
|
425
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
426
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
427
|
+
|
|
428
|
+
[[package]]
|
|
429
|
+
name = "version_check"
|
|
430
|
+
version = "0.9.5"
|
|
431
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
433
|
+
|
|
434
|
+
[[package]]
|
|
435
|
+
name = "windows-link"
|
|
436
|
+
version = "0.2.1"
|
|
437
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
438
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
439
|
+
|
|
440
|
+
[[package]]
|
|
441
|
+
name = "windows-sys"
|
|
442
|
+
version = "0.61.2"
|
|
443
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
444
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
445
|
+
dependencies = [
|
|
446
|
+
"windows-link",
|
|
447
|
+
]
|
|
448
|
+
|
|
449
|
+
[[package]]
|
|
450
|
+
name = "winnow"
|
|
451
|
+
version = "0.5.40"
|
|
452
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
453
|
+
checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
|
|
454
|
+
dependencies = [
|
|
455
|
+
"memchr",
|
|
456
|
+
]
|
|
457
|
+
|
|
458
|
+
[[package]]
|
|
459
|
+
name = "zmij"
|
|
460
|
+
version = "1.0.23"
|
|
461
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
462
|
+
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
rusty_lang-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mohtasham-kali
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rusty-lang
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Rust
|
|
9
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Summary: Rusty hybrid programming language CLI, runtime, and Python import hook (*.rusty)
|
|
12
|
+
Keywords: rusty,rust,python,hybrid-language,fastapi
|
|
13
|
+
Author: mohtasham-kali
|
|
14
|
+
License: MIT
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
17
|
+
Project-URL: Homepage, https://github.com/mohtasham-kali/rusty
|
|
18
|
+
Project-URL: Issues, https://github.com/mohtasham-kali/rusty/issues
|
|
19
|
+
Project-URL: Repository, https://github.com/mohtasham-kali/rusty
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="assets/rusty-logo.png" alt="Rusty Logo" width="220" />
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
# Rusty: Hybrid Systems & Python Runtime Ecosystem
|
|
26
|
+
|
|
27
|
+
[](LICENSE)
|
|
28
|
+
[](https://github.com/mohtasham-kali/rusty/releases)
|
|
29
|
+
|
|
30
|
+
**Rusty** (`*.rusty`) is an open-source hybrid programming language and runtime engine that combines Rust's low-memory, low-CPU execution model and single-core cooperative concurrency with Python's rich library ecosystem (FastAPI, Flask, Django, NumPy, PyTorch, SciPy).
|
|
31
|
+
|
|
32
|
+
Rusty is managed by **`rusty-pm`**, a unified package manager that orchestrates both Cargo crates and Python distributions inside an isolated `.rusty/` sandbox.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Performance Targets & Architecture
|
|
37
|
+
|
|
38
|
+
| Feature | Rusty Approach | Python Default | Benefit |
|
|
39
|
+
| :--- | :--- | :--- | :--- |
|
|
40
|
+
| **RAM Footprint** | Native 64-bit compact values, `LazyRange` iterators, and `MemoryArena` bump allocator | Heavy PyObject headers + pointer indirection | Compact memory footprint |
|
|
41
|
+
| **CPU Usage** | Single-threaded cooperative `async`/`await` via Tokio `current_thread` | Heavy OS thread pools with GIL contention | Default **1 core usage**, zero thread churn |
|
|
42
|
+
| **Python Overhead** | **Lazy-initialized**: embedded Python boots only upon first `py` call | Eager interpreter initialization | **Near-zero overhead** for pure-Rust scripts |
|
|
43
|
+
| **GIL Management** | Releases Python's GIL (`PyEval_SaveThread`) during Rust compute | Constant GIL locking across tasks | Seamless background async tasks |
|
|
44
|
+
| **Cold Starts** | SHA-256 AOT hash-cached AST artifacts (`.rusty/cache/`) | Re-parsing on cold execution | Instant re-execution of unchanged scripts |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Quick Start & Installation
|
|
49
|
+
|
|
50
|
+
### Linux & macOS
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
curl -fsSL https://raw.githubusercontent.com/mohtasham-kali/rusty/main/install.sh | sh
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Windows (PowerShell)
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
irm https://raw.githubusercontent.com/mohtasham-kali/rusty/main/install.ps1 | iex
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Python (`pip`)
|
|
63
|
+
|
|
64
|
+
Install the `rusty` CLI and `rusty_py_bridge` Python import hook:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install rusty-lang
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Cargo (Crates.io)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cargo install rusty-cli
|
|
74
|
+
cargo install rusty-pm
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Build from Source
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone https://github.com/mohtasham-kali/rusty.git
|
|
81
|
+
cd rusty
|
|
82
|
+
cargo build --release
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Bidirectional `fn` (Rust Mode) + `def` (Python-Bridge Mode)
|
|
88
|
+
|
|
89
|
+
Inside a single `.rusty` file, combine **`fn`** for native zero-GIL compute kernels with **`def`** for Python-parameterized functions and ecosystem calls:
|
|
90
|
+
|
|
91
|
+
```rusty
|
|
92
|
+
// hybrid_app.rusty
|
|
93
|
+
py import math
|
|
94
|
+
|
|
95
|
+
struct ComputeStats {
|
|
96
|
+
primes: int,
|
|
97
|
+
sqrt_primes: float,
|
|
98
|
+
status: str,
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Compiled-style native compute function (zero Python GIL overhead)
|
|
102
|
+
fn count_primes(limit: int) -> int {
|
|
103
|
+
let mut count = 0
|
|
104
|
+
let mut n = 2
|
|
105
|
+
while n <= limit {
|
|
106
|
+
let mut is_prime = true
|
|
107
|
+
let mut d = 2
|
|
108
|
+
while d * d <= n {
|
|
109
|
+
if n % d == 0 {
|
|
110
|
+
is_prime = false
|
|
111
|
+
break
|
|
112
|
+
}
|
|
113
|
+
d = d + 1
|
|
114
|
+
}
|
|
115
|
+
if is_prime {
|
|
116
|
+
count = count + 1
|
|
117
|
+
}
|
|
118
|
+
n = n + 1
|
|
119
|
+
}
|
|
120
|
+
return count
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Python-bridge orchestrator with default parameters & `py` interop
|
|
124
|
+
async def analyze(limit: int = 20000, label: str = "Prime Report") -> ComputeStats {
|
|
125
|
+
let total = count_primes(limit)
|
|
126
|
+
let root = py math.sqrt(total)
|
|
127
|
+
print(label, "-> primes:", total, "sqrt:", root, sep=" ")
|
|
128
|
+
|
|
129
|
+
return ComputeStats {
|
|
130
|
+
primes: total,
|
|
131
|
+
sqrt_primes: root,
|
|
132
|
+
status: "complete",
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
async def main() {
|
|
137
|
+
let report = await analyze(label="Rusty Hybrid Benchmark")
|
|
138
|
+
print("Status:", report.status)
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Run with built-in benchmarking:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
rusty run hybrid_app.rusty --bench
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Unified Package Manager (`rusty-pm`)
|
|
151
|
+
|
|
152
|
+
`rusty-pm` manages Cargo crates, Python wheels, and `.rusty` modules in `rusty.toml`:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
rusty-pm init my-app
|
|
156
|
+
rusty-pm add --rust tokio
|
|
157
|
+
rusty-pm add --py fastapi
|
|
158
|
+
rusty-pm install
|
|
159
|
+
rusty-pm sync # Syncs packages installed manually via pip back into rusty.toml
|
|
160
|
+
rusty-pm dev
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Scaffold full-stack templates:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
rusty-pm create my-api --template fastapi
|
|
167
|
+
rusty-pm create my-desktop --template react-electron
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Documentation
|
|
173
|
+
|
|
174
|
+
- [Language Syntax (`fn`, `def`, `.rusty` rules)](docs/syntax.md)
|
|
175
|
+
- [Package Manager (`rusty.toml` & `rusty-pm`)](docs/package-manager.md)
|
|
176
|
+
- [Framework Integration (FastAPI, Flask, Django, React, Electron, Flutter)](docs/frameworks.md)
|
|
177
|
+
- [Launch & Release Notes](LAUNCH.md)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Repository Workspace Structure
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
rusty/
|
|
185
|
+
├── assets/ # Rusty logos and icons
|
|
186
|
+
├── docs/ # Language, package manager, and framework docs
|
|
187
|
+
├── rusty-core/ # Core compiler, AST parser, MemoryArena, PyO3/FFI C ABI
|
|
188
|
+
├── rusty-cli/ # CLI frontend: `rusty run`, `build`, `eval`, `check`, `info`
|
|
189
|
+
├── rusty-pm/ # Unified package manager (`rusty-pm`)
|
|
190
|
+
├── rusty-py-bridge/ # Maturin package (`rusty-lang`) & Python import hook
|
|
191
|
+
├── editors/vscode/ # VS Code extension & .rusty TextMate grammar
|
|
192
|
+
├── examples/ # Runnable .rusty demonstration scripts
|
|
193
|
+
├── install.sh # Linux/macOS one-line installer
|
|
194
|
+
├── install.ps1 # Windows PowerShell one-line installer
|
|
195
|
+
└── LICENSE # MIT License
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
Licensed under the [MIT License](LICENSE) — Copyright (c) 2026 `mohtasham-kali`.
|
|
203
|
+
|