🐍 Python meets the crab 🦀 - Friendship at first sight?
summary
Demonstrates using PyO3 with maturin to call Rust from Python, shows a prime-finder benchmark with a 12× speedup, and reports real projects (TOML formatter, tox formatter) compiled into binary wheels. Notes that ~95% of usage runs Rust inside Python, that panics map to BaseException, and that building multiplatform releases requires producing ~22 wheels if prebuilt binaries are desired. Advises watch for GIL handoffs, type marshalling choices, and cross-language overhead.
AI-written summary · about
chapters (13)
- 0:00Introduction to Rust
- 10:24Why mix Python and Rust
- 15:48PyO3 and Maturin tools
- 19:25Implementation example
- 22:47Exposing Rust to Python
- 26:24Project configuration
- 28:42Python import system
- 33:14PyO3 communication layer
- 35:17Technical challenges
- 41:03Rust versus Cython
- 42:03Challenges and limitations
- 47:13Learning and resources
- 49:44Q&A session
related talks
29mCrabs in Snakes!
46mPython + Rust = ?
44mDo Pythons Rust? How we used PyO3 to build a Python Stream Processor w/ a Rust Heart
44mHow Python Harnesses Rust through PyO3
34mRust for the Python dev
35mUsing Rust to write Python modules
36mPumping up Python modules using Rust
29mThe Art of Extending Python with other languages
