PyO3: From Python to Rust and Back Again (with David Hewitt)
There’s huge pressure on Python at the moment to get faster, ideally without changing at all. One increasingly–popular way of achieving that impossible task is to push the performance critical code down into C, C++, or Rust. And this week we’re focussing on the Python route, as we take a look at PyO3. David Hewitt’s the principal committer to PyO3, and he joins us to go through the easy parts, the hard parts, and the works in progress, giving us an insight into how Python and Rust work under the hood, and quite how much work it takes to make them work as one. – Become a Supporter on Patreon: / developervoices Become a Supporter on YouTube: / @developervoices PyO3 User Guide: https://pyo3.rs/v0.22.0/ PyO3 on Github: https://github.com/PyO3/pyo3 Polars: https://pola.rs/ Tokio: https://tokio.rs/ Trio: https://trio.readthedocs.io/ Robyn: https://github.com/sparckles/Robyn Faster CPython: https://github.com/faster-cpython Maturin: https://www.maturin.rs/ David on Mastodon: https://fosstodon.org/@davidhewitt David on Twitter: https://x.com/davidhewittdev Kris on Mastodon: http://mastodon.social/@krisajenkins Kris on LinkedIn: / krisjenkins Kris on Twitter: https://x.com/krisajenkins -- 0:00 Intro 3:09 How David Got Involved in PyO3 7:01 So Starting With Python To C... 9:20 Taking That To Rust 17:37 Calling Rust from Python 20:54 Understanding PyO3's Place In The Stack 21:52 Memory Safety 30:37 Rust's Lifetimes 35:07 Applying Lifetimes to Python Code 38:24 Let's Get Into Error Handling 55:55 The Performance Cost 1:01:19 Threading 1:16:05 David's Motivations 1:19:22 Supporting Python's Sub-Interpreters 1:24:14 The Limits of Compile-Time Guarantees 1:27:32 Getting Started with PyO3 1:33:01 Outro

Mojo Lang - Tomorrow's High Performance Python? (with Chris Lattner)

Is Odin "Programming done right"? (with Bill Hall)

Why Rust is different, with Alice Ryhl

Creating and Evolving Elixir (with José Valim)

Architecture, AI agents, and product empathy with Robert C. Martin

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

Keynote: Rust is not about memory safety - Helge Penne - NDC TechTown 2025

The State of Full-Stack OCaml (with António Monteiro)

"It's Pythons All The Way Down: Python Types & Metaclasses Made Simple" - Mark Smith (PyCon AU 2019)

Architecting Bevy - A Rust Game Engine (with Alice Cecile)

What's Zig got that C, Rust and Go don't have? (with Loris Cro)

Techniques learned from five years finding the way for Rust in Python - David Hewitt

Unveiling Game Development in Rust With Bevy

How the OS actually works

Will Crichton: Rust for Everyone!

Will Turso Be The Better SQLite? (with Glauber Costa)

The FASTEST and SAFEST Database

Rust & Zig Combined • Richard Feldman • GOTO 2023

Talks - David Hewitt: How Python Harnesses Rust through PyO3

