Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Introducing RustPython, a Python 3 interpreter written in Rust

Save for later
  • 2 min read
  • 04 Feb 2019

article-image

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.

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

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime