Example of a PyO3 project integrating Python and Rust.
- Install maturin
pipx install maturin
- Get help on maturin
maturin --help
- Get help on maturin new command
maturin new --help
- Create a new mixed Python & Rust project
maturin new --bindings pyo3 --mixed my_project
Make sure that the following rust tools are in the path
rust-analyzer --version
rustfmt --version
maturin develop
- Run test Python files
make pytest
- Run test Rust files
cargo test
Python and Rust project with PyO3 bindings
Calling Rust from Python using PyO3
Nine rules for Python extensions in Rust