~/talk

Macromancy: an introduction to Rust macros

Talkat RustFest Zürich 2017 · 2017-09-30..10-01· [rust]
slides:none on file

Shows that Rust macros actually generate concrete code: uses macro_rules! patterns, hygiene rules and dollar_crate to avoid qualification pain, and combines declarative and procedural approaches. Debugging uses the compiler pretty expansion, unstable trace_macros and stringify traces; recursion hits a practical limit (bumped from 64 to 128 during work). Demonstrates a real build: lapa an AMQP client generated from XML via Handlebars templates and cookie_factory macros, which compiles and runs after refactoring recursion-heavy parts.

AI-written summary · about

  1. 0:00Introduction
  2. 1:55Why use macros
  3. 6:07Hygiene
  4. 7:23Repetition
  5. 8:11Importing macros
  6. 10:02Macro match
  7. 13:30Macro wrap
  8. 15:24Macros
  9. 18:50Macro passers
  10. 21:15Conclusion
~/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.