~/talk

Crabs in Snakes!

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [rust, python]
links:none on file
slides:none on file

Shows how to compile Rust into a Python extension using PyO3 and the Rust toolchain (rustup, Cargo) and how to build/distribute with Maturin (use maturin develop locally and maturin generate-ci for CI). A straight rewrite of a hot path yields ~6× speedup on a contract that previously took over six minutes; releases publish ~50 prebuilt wheels per version. Demonstrates type conversions (i32 overflow raises a Python OverflowError) and the minimal boilerplate needed to import a compiled module.

AI-written summary · about

  1. 0:00Python and Rust trade-offs
  2. 2:11Introducing grimp and import lint
  3. 3:58Six times speedup with Rust
  4. 5:24Python calling Rust extensions
  5. 7:13Installing Rust toolchain
  6. 8:17Creating first Rust module
  7. 10:03Using PyO3 for Python interop
  8. 11:30Building with cargo
  9. 13:55Testing the Rust module
  10. 14:18Adding Maturin to workflow
  11. 15:22Project structure setup
  12. 16:47Cross-platform wheels with Maturin
  13. 18:58Automating releases
  14. 19:21Implementing a Rust function
  15. 20:46Crabs and snakes demo
  16. 21:30Handling Rust integer overflow
  17. 22:33Type conversion across languages
  18. 24:20Rust learning challenges
  19. 25:05Conclusion and benefits
  20. 25:36Q&A session
~/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.