Creating Python extensions in Rust using PyO3
This post describes how I approached writing a Python extension in Rust. The post covers:
- why one would even want to do this 🙃
- the approaches for calling Rust code from Python
- an overview of how to create a Python module in Rust using PyO3
- some tricky parts, e.g. inheritance
- building and distributing wheels
Let’s get started.