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.