github.com/RustPython/RustPython

A Python Interpreter written in Rust

Open this visualization on its own page →

Contributors

210

Lines of Code

17,625

From

2018-05-28

To

2020-12-19

About RustPython/RustPython

RustPython is a Python 3 interpreter implementation written entirely in Rust, aiming for compatibility with CPython 3.14.0 and later. Rather than binding to CPython, it provides a clean, from-scratch implementation of the Python language runtime. The project is designed to be embeddable in Rust applications, compilable to WebAssembly for browser execution, and capable of running Python code in environments where traditional CPython would be impractical.

The interpreter supports standard Python features including an interactive shell, package management via pip (when built with SSL support), and virtual environments. It includes an experimental just-in-time compiler that can convert Python functions to native code, though this feature requires additional build dependencies and careful configuration. RustPython compiles to WebAssembly WASI modules for standalone execution and can be deployed through various channels including the Rust crates registry and conda.

Real-world adoption has grown beyond experimentation, with projects like GreptimeDB using RustPython for embedded scripting, and tools like Ruff leveraging Rust for Python-related tooling. The project explicitly acknowledges it remains under development and not yet production-ready, but welcomes contributions through an active Discord community and established contribution guidelines.

Share this video