~/talk

Proving macro expansion with expandable

Talkat EuroRust 2024 · 2024-10-10..10-11· [rust]
slides:none on file

Claim: expandable proves a declarative macro always expands to syntactically valid Rust by converting macro transcribers into state machines then into a custom VM parser. It ships as the crate "expandable" and runs via an attribute macro on a macro definition, finds real errors like using -> instead of . and emits helpful diagnostics. Current limits include a partial parser, trouble with recursive macros and macro rulesetion generation, but the prototype works end to end.

AI-written summary · about

  1. 0:00Proving macro expansion
  2. 1:25Declarative macros in Rust
  3. 3:12Macro implementation example
  4. 5:22Macros need validation tools
  5. 7:30Defining valid macro expansion
  6. 8:36Language theory for macro validation
  7. 10:01Algorithm for macro validation
  8. 15:11Building interruptable parser
  9. 16:57Parser implementation approaches
  10. 18:00Demo of expandable crate
  11. 19:28Limitations of expandable
  12. 20:51Summary
~/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.