1 min read

RustPython is an open-source Python 3 interpreter written in Rust with the whole Python 3 implementation completely done in Rust.

This interpreter is currently in the early stages and the documentation is also being developed.

You need wasm-pack and npm to install it. You can test it by using the following code:

$ git clone https://github.com/RustPython/RustPython
$ cd RustPython
$ cargo run demo.py
Hello, RustPython!

The code style used is rustfmt. You can also test with cargo on the interactive shell.You can run only basic examples as currently there is only preliminary support for WebAssembly. Using a memory safe language like Rust instead of C or C++ has benefits as pointed out by a Hacker new user: “At least 1/3 of Python’s CVEs could have been prevented by using a memory safe language like Rust.”

Another user said: “This is wonderful. This could become the best way to move Python projects to Rust: initially just run on the RustPython interpreter, but then optimize low-level routines in Rust. In 15 years I wouldn’t be surprised if this or something like it surpasses CPython in popularity.

For more details and installation instructions visit the GitHub repository.

Read Next

Rust 1.32 released with a print debugger and other changes

EuroPython Society announces the ‘Guido van Rossum Core Developer Grant’ program to honor Python core developers

Python governance vote results are here: The steering council model is the winner

Data science enthusiast. Cycling, music, food, movies. Likes FPS and strategy games.