News

Introducing RustPython, a Python 3 interpreter written in Rust

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 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

Prasad Ramesh

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

Share
Published by
Prasad Ramesh

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago