Shipping Python Extensions in Rust Two Million Times a Day
summary
pyca/cryptography moves core extension code to Rust using PyO3 and setuptools-rust, lands about seven upstream PRs and several thousand lines to add abi3 support, fixes musl/alpine and 32‑bit Windows build quirks, ships a two‑step rollout (3.4 optional rust then 3.5 required), rewrites ASN.1/x509 parsing to Rust and measures an 10x faster OCSP parse, convinces infra for manylinux/musl wheels, and reaches roughly 80% of downloads on rust-capable systems.
AI-written summary · about
chapters (10)
- 0:00Intro
- 1:20Why Rust?
- 4:44How we adopted Rust
- 6:24Cleanup on aisle: everything
- 10:48How do we decide what to support?
- 15:43Outreach and Initial Release
- 19:03Lessons Learned
- 21:32Doing something useful
- 22:36Performance Results
- 23:24Architectural improvement
related talks
35mUsing Rust to write Python modules
36mPumping up Python modules using Rust
34mRust for the Python dev
31mPumping up Python modules using Rust
44mHow Python Harnesses Rust through PyO3
29mCrabs in Snakes!
32mRust for CPython: Making Python Safer and More Robust for Everyone
20mSecurity Initiatives in Community Driven Projects: Looking Ahead with Python and Rust
