Ben Chuanlong Du's Blog

It is never too late to learn.

Calling Rust from Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tools

pyo3

Rust bindings for Python, including tools for creating native Python extension modules. Running and interacting with Python code from a Rust binary is also supported.

maturin

Build and publish …

Tips on rustup

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Install rustup

Linux and macOS

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y

Rust tools (rustc, cargo, rustup, etc) will be added to Cargo's bin directory …