Rust for CPython: Making Python Safer and More Robust for Everyone
summary
CPython contains over a million lines of C and recent work changes ~500,000 lines, causing a 4× rise in incoming security reports. The proposal adds Rust in CPython 3.16 with a new private API, implements the zlib module via zlib-rs faster than zlib-ng, keeps a C fallback required for build compatibility, and relies on fuzzers sanitizers and LLM-assisted triage. Android reports show a 1,000x reduction in memory vulnerabilities for Rust code.
AI-written summary · about
chapters (14)
- 0:00Welcome
- 1:35Data race in Python
- 2:36C in CPython risks
- 3:41Undefined behavior in C
- 6:12Undefined behavior challenges
- 8:18Current mitigations limits
- 11:31Rust for CPython
- 13:40Rust improves reliability
- 15:49Unsafe Rust boundaries
- 16:52Vulnerabilities and productivity
- 17:37Python 3.16 Rust proposal
- 21:35Rust zlib implementation
- 22:39Future Rust plans
- 24:47Q&A
related talks
09mBringing Rust into Python
34mRust for the Python dev
31mPumping up Python modules using Rust
26mShipping Python Extensions in Rust Two Million Times a Day
20mSecurity Initiatives in Community Driven Projects: Looking Ahead with Python and Rust
36mPumping up Python modules using Rust
31mCan Rust make Python shine?
45mBuilding Safe and Secure Systems in Rust
