The Art of Extending Python with other languages
summary
Shows how a CPython extension compiles from C/C++ and from Rust, with working examples that build and import into Python, not vague theory. Demonstrates pyproject.toml builds, binding generators like PyBind11 and nanobind, and Rust’s PyO3, plus Shiboken for Qt. Benchmarks run a real glob rewrite over 1,000 directories with 1,000,000 files each and reports C++ faster than the Rust binding, with concrete compile and API details.
AI-written summary · about
chapters (14)
- 0:00Extending Python overview
- 2:11Why Python extensions matter
- 7:28CPython C basics
- 9:52Extending with C++
- 13:04Rust for Python
- 15:11Zig as a safer alternative to C
- 17:37Other languages
- 18:39Manual C++ extensions
- 19:42Binding generators
- 24:18Language exposure challenges
- 25:20Performance benchmarks
- 26:22When to use extensions
- 27:04Python ecosystem future
- 28:51Q&A
related talks
25mHow to bring your C++ project to Python land
31mPumping up Python modules using Rust
35mUsing Rust to write Python modules
36mPumping up Python modules using Rust
40mNine Rules for Writing Python Extensions in Rust
36mIntroduction to C++ python extensions and embedding Python in C++ Apps
46mPython + Rust = ?
03h 19mPyO3 101 - Writing Python modules in Rust
