Runs Python 3 code through a Rust-based interpreter, with an interactive shell, embedding in Rust programs, and WebAssembly builds for browser use.
Overview
RustPython implements a Python 3 language environment written in Rust rather than as bindings around CPython. The project aims for a full Python setup in Rust with a comparatively straightforward core design.
You can run scripts from the command line, use an interactive shell, or install builds via common package routes noted in the materials. Optional SSL-related features enable HTTPS and pip installation when enabled. An experimental JIT can compile selected Python functions to native code when built with the appropriate feature flags.
Embedding examples show how Rust applications can expose Python scripting, which suits cases where faster iteration on logic is useful. WebAssembly compilation targets let Python run in browsers, including a hosted online demo.
Documentation and architecture guides are still maturing alongside the runtime. The maintainers note the interpreter is not fully production-ready but is usable for WASM runs, embedding experiments, and related exploration.
Key features
- Rust-implemented Python 3 runtime
- Interactive command-line shell
- Embed as Rust application scripting
- WebAssembly and WASI builds
- Optional pip with SSL features
- Experimental JIT for functions
- Standard library bundling options
- Online browser demo
Use cases
- Python scripting inside Rust apps
- Browser-based Python trials
- Avoiding CPython in Rust stacks
- WASM Python experiments
- Learning interpreter internals