Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 2.93 KB

index.markdown

File metadata and controls

60 lines (50 loc) · 2.93 KB
layout explainer build-from-source-link demo installation goals
home
RustPython is a Python interpreter written in Rust. RustPython can be embedded into Rust programs to use Python as a scripting language for your application, or it can be compiled to WebAssembly in order to run Python in the browser. RustPython is free and open-source under the MIT license.
command
command
wapm install rustpython
command
conda install rustpython -c conda-forge
goal progress
Full Python 3 environment entirely in Rust (not CPython bindings), with a clean implementation and no compatiblity hacks.
RustPython can currently run a little less than half of the CPython regression test suite, and our API is relatively unstable and doesn't require decades of backwards-compatibility.
goal progress
Fast, reliable and secure implementation of Python that can be used from Rust or compiled to WebAssembly.
RustPython currently runs about 10 times slower than CPython, but there's still lots of optimizations to be made. RustPython can be easily embedded into Rust programs simply by adding a line to Cargo.toml, and natively supports WebAssembly; see our demo above.

Why RustPython?

There are many implementations of Python. For example:

Each of these implementations offer some benefits: Jython, for example, compiles Python 2 source code to Java byte code, then routes it to the Java Virtual Machine. Because Python code is translated to Java bytecode, it looks and feels like a true Java program at runtime and so it integrates well with Java applications.

IronPython is well-integrated with .NET, which means IronPython can use the .NET framework and Python 2 libraries or vice versa.

We want to unlock the same possibilities that Jython and IronPython enable, but for the Rust programming language. In addition, thanks to Rusts' minimal runtime, we're able to compile RustPython to WebAssembly and allow users to run their Python code easily in the browser.