Do Pythons Rust? How we used PyO3 to build a Python Stream Processor w/ a Rust Heart
summary
Shows concrete wins and tradeoffs: using PyO3/PyOxide plus Maturin compiles Rust into a Python module and a recursive Fibonacci (n=35) example moves from ~1.13s in Python to ~80–130ms in Rust (roughly 9–14× faster) with far less memory. Builds a real system — Bytewax — that layers a Rust engine on a Python API using timely data flow, and explains practical costs: GIL interactions, pickle serialization, platform packaging, and developer ergonomics.
AI-written summary · about
chapters (19)
- 0:00Python and Rust integration
- 1:04Why Python developers seek Rust performance
- 3:30Why devs love Rust
- 5:16Rust’s developer quality of life advantages
- 6:17Python vs Rust performance
- 8:44PyO3 for Rust-Python
- 13:42BX stream processor
- 16:26Timely Data Flow in BX
- 18:29BX early PyO3 dev
- 21:16Rebuilding BX for usability
- 23:00PyO3 integration challenges
- 26:50BX open-source project
- 28:14Live BX data flow demo
- 35:24Q&A: BX origins
- 37:14Q&A: Rust in BX ML
- 38:16Q&A: Rust in BX engine
- 39:01Q&A: BX starting point
- 40:04Q&A: Python failures in Rust
- 41:29Q&A: PyO3 flexibility
related talks
46mPython + Rust = ?
44mHow Python Harnesses Rust through PyO3
36mPolishing Python: Preventing Performance Corrosion with Rust
34mRust for the Python dev
36mPumping up Python modules using Rust
01h 07m🐍 Python meets the crab 🦀 - Friendship at first sight?
35mUsing Rust to write Python modules
31mPumping up Python modules using Rust
