rusty-lang 0.1.0__py3-none-win_amd64.whl

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.
Binary file
@@ -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: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
28
+ [![Release](https://img.shields.io/github/v/release/mohtasham-kali/rusty)](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
+
@@ -0,0 +1,12 @@
1
+ rusty_lang-0.1.0.data/scripts/rusty.exe,sha256=bVSDVemiVVEG2ulKp61dXLX4MkqIGGoG4VmKycYg4Dg,1544192
2
+ rusty_lang-0.1.0.dist-info/METADATA,sha256=31Kf-4SP416epLpkoZHXJdYRr4X-YvQnfQkF7RJFR0s,6600
3
+ rusty_lang-0.1.0.dist-info/WHEEL,sha256=Uvw7WSmy7Kj2FBk8Va4L_dq4MDW8X5Ynby-pOX3ZNS0,94
4
+ rusty_lang-0.1.0.dist-info/licenses/LICENSE,sha256=jMTDx72-bFjSvM7k3AxSDkfTUR-NfLLFvZ5R7wxaIBU,1094
5
+ rusty_lang-0.1.0.dist-info/sboms/rusty-cli.cyclonedx.json,sha256=K1OaaKj04FpDXBQUVA6Mb1DeGIFJeyR7Ee3JF2fGYUg,46961
6
+ rusty_py_bridge/__init__.py,sha256=ONAA9H5-Kev6Pqxgt2EUsmKJhfdAnidwZvpxsWANUDE,639
7
+ rusty_py_bridge/__main__.py,sha256=Kyw2xN555ZiLPMZOF8jZZqUAtosSosv4nSZGd4vRXGQ,67
8
+ rusty_py_bridge/cli.py,sha256=bN7j8g0SCMhMtz6DEK5OyDUqnMRQV-EFkPR2t68sSPc,624
9
+ rusty_py_bridge/firewall.py,sha256=TSkkpLK0ua8bsl69oIkq9DTGhOzHme2ZCyRPgS-mMQI,11204
10
+ rusty_py_bridge/importer.py,sha256=Hi3LTKh1_JH0yN0qJfNDa74yU5-d_gye_3uGDIrN1B0,2008
11
+ rusty_py_bridge/runtime.py,sha256=qk3C2vyJN1r1245c5Hu2CXOP_K01MgpV4G_bvf4nOjc,3969
12
+ rusty_lang-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.16.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -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
+