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 crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages.

A Single Library for Rust and Python

A single library crate for Rust and Python

Wrap Rust Library for Python (without changing Rust library)

Calling Python from Rust

References

Comments