~/talk

PyO3 101 - Writing Python modules in Rust

Talkat PyCon US 2024 · 2024-05-15..05-23· [rust]
slides:none on file

Step‑by‑step demo of setting up a Cargo project setup and adding PyO3 to produce a native Python extension written in Rust, with live code that builds a small library, imports the compiled module in Python, and runs its functions. Covers writing Python‑callable Rust functions and modules, mapping Rust errors to Python exceptions, converting common types (strings, lists, tuples), and shows the rebuild and import cycle so the extension actually works on a local machine.

AI-written summary · about

  1. 0:00PyO3 and Rust intro
  2. 21:50Setting up PyO3 project
  3. 1:02:10First Rust module
  4. 1:58:38Python objects in Rust
  5. 2:45:12Rust performance in Python
  6. 3:18:59Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.