~/talk

Extending MicroPython with Rust: Two Worlds Collide

Talkat NDC TechTown 2025 · 2025-09-22..09-25· [rust, python]
links:none on file
slides:none on file

MicroPython firmware (≈65,000 lines) on STM32-class devices with ~192–256KB RAM meets Rust to regain speed and reduce allocations; proto codec rewritten in Rust gives ~5× speedup, UI moved to a custom Rust embedded toolkit, crypto stays in C. Key engineering pieces: a GCBox owner wrapper, an owned st buffer for safe string slices, and an unsafe get_buffer API for mutable memory views; exceptions use a C trampoline with NLR jumps and a planned VM-lifetime token to encode safety.

AI-written summary · about

  1. 0:00MicroPython and Rust integration
  2. 3:40Memory safety challenges
  3. 13:23Rust ownership vs Python pointers
  4. 15:58Rust wrappers for MicroPython objects
  5. 21:07GCBox for garbage-collected references
  6. 23:32Safe strings and byte buffers
  7. 27:03Mutable byte types challenges
  8. 28:07Wrapping Python lists and dicts
  9. 31:47Python exceptions to Rust errors
  10. 35:04Catching Python exceptions
  11. 41:06Python iterators in Rust
  12. 44:16Safer Rust integration
  13. 46:23Q&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.