SlimePython — Hybrid Bit-Exact Isolate Model
The same structural-translation engine that converts legacy COBOL / JCL / MUMPS / PL/I / RPG to Java & Rust now covers a modern language. Python source becomes Rust source, and the two produce SHA-256-identical output on the same input. Not “approximately equivalent”. Byte-for-byte.
LANGUAGE · SlimeNENC
Not only legacy. Modern languages too.
We do not “understand the meaning” of your Python and rewrite it. Meaning depends on human perception — there is no mathematical rigor in it. The source is structure. SlimePython projects (π) that structure onto Slot IR and transcribes it, structure-preserving, into Rust. No probabilistic code generation, no LLM in the path — deterministic, bit-exact, third-party reproducible.
What it does
SlimePython takes a statically-analyzable, type-hinted subset of Python and emits a complete Rust (Cargo) project. The contract is exact: for the same input, the Python program and the generated Rust program produce byte-for-byte identical output, verified by SHA-256. Every conversion ships with the comparison harness and a WASI reproduction script, so anyone can re-run the proof.
- InputPython 3.12+,
from __future__ import annotations, passesmypy --strict. Statically-analyzable subset only. - OutputRust 1.75+ source, full Cargo project, plus the SHA-256 verification script.
- GuaranteePhase 1–2: bit-exact (SHA-256 identical). Phase 3–4: token-exact for numerical / LLM inference.
- PathStructure → Slot IR → Rust. No LLM, no probabilistic generation anywhere. Third parties reproduce on WASI.
Bit-exact, not “understood”
The whole point is to refuse the “semantic understanding” step. “Meaning” depends on human perception and reads differently to different people, so any “understand-it-then-rewrite” migration injects that wobble. SlimePython treats the source as structure (unambiguous, uniquely determined), projects it onto Slot IR, and transcribes it structure-preserving into Rust. Because no meaning layer is crossed, the result is mathematically rigorous: run it as many times as you like, the output is bit-identical.
Correctness is observational, not normative.
Full Python — Hybrid Bit-Exact Isolate
Do not re-invent dynamic Python in Rust. Run dynamic Python as Python (in CPython). Any Python is auto-partitioned into three regions, each given the strongest honest guarantee:
| Region | Translation target | Bit-exact guarantee |
|---|---|---|
| Static Region | → pure Rust via the Slot IR | 100% (structural) |
Dynamic Isolate (Any/dynamic getattr/monkey patch/eval, etc.) | → kept as Python, delegated to a deterministic CPython Isolate | pinned-runtime 95-99% |
True non-determinism (unseeded random/wall-clock/I/O/true concurrency/C extensions/id()) | → reject | outside the bit-exact guarantee (explicit) |
Evidence — all third-party reproducible
The §14 model was validated with 11 PoCs on real hardware (WSL2 / CPython 3.12.3 / RustPython 0.5.0 / wasmtime, measured on a single machine with a pinned CPython):
- Dynamic Isolate20 real-world dynamic + 15 §13-reject categories + 5
Any= 40/40 bit-exact (Python = CPython Isolate, identical stdout SHA-256:eval/exec, dynamic getattr/setattr, monkey patching, metaclass, dataclass, generators). - Full tier speedAt or above python3 (0.60× short-lived / 0.99× hot loops). The early slowdown was the shared-.so PIC — resolved with a static build.
- Light tierRustPython 19/20 (only difference is exception wording; semantics match), cross-compiled to wasm32-wasip1 for WASM 20/20.
- Auto-routingFull ↔ Light chosen from static signals + a runtime profile, 0 mis-routes over 20 samples.
Real source, conversion code, measurements, full reproduction bundle (downloadable), the §13 static-lift spec, and the per-construct status are consolidated on the PoC 0–11 deep-dive (primary data). The jargon-free entry point is the gentle intro.
Product tier
| Tier | Content | Bit-exact | Binary |
|---|---|---|---|
| Free / Open | Static subset + known lifts | 100% | ~3-5 MB WASM |
| Hybrid Light | RustPython embedded; accepts dynamic | best effort | ~10-15 MB WASM |
| Hybrid Pro | CPython embedded; cross-version maintained via CI | 95-99% | ~30-50 MB native |
Where it pays off
- AI inferencePort Python ML / LLM inference to Rust (and WASM) — 3-way token-exact, validated on Qwen2.5-class models. The weights never change.
- numpy → ndarrayNumerical Python mapped to Rust
ndarraywith the same results, not a “mostly matches” re-implementation. - Prototype → productionKeep prototyping in Python; ship the deterministic, single-binary, memory-safe Rust — provably the same behaviour.
- Audit / regulated“Same output, proven by hash” is the deliverable — no manual “looks right” UAT.
Status
SlimePython is at Phase 1–4 PoC (Phase 1–2 bit-exact; Phase 3–4 token-exact for numerical / LLM inference), with a paper draft prepared. It is the modern-language member of the SlimeNENC structural-translation family — the legacy members convert COBOL / JCL / MUMPS / PL/I / RPG and assembler. Full verification data is on the PoC deep-dive; the intro is the gentle intro. Pricing and terms: contact us.
Contact us / request a PoC PoC 0–11 deep-dive (primary data) Gentle intro SlimeCOBOL (legacy) See other products
