~/talk

PyO3: Rust 💚 Python

Talkat Conf42 Python 2023 · on Thursday, 2023-03-09· [rust, python]
linkedin:moshezadka
slides:none on file

Implements a Rust counter that checks whether a character appears at least N times with optional newline and space resets, exposes it to Python as a pyclass with a constructor and a has_count method, and uses PyO3 annotations so no separate glue code is needed. Development uses maturin (maturin develop) and produces CPU-specific wheels with maturin build. Code runs, is memory‑safe, and is significantly faster than a pure Python equivalent while remaining zero‑cost in abstractions.

AI-written summary · about

  1. 0:00PyO3 and Rust intro
  2. 0:54Why Rust is useful
  3. 2:19Counting characters example
  4. 4:50Rust counting logic
  5. 8:01Wrapping Rust with PyO3
  6. 10:55Building Python module
  7. 12:42Testing PyO3 module
  8. 13:45Python and Rust benefits
~/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.