~/talk

Crafting Rust Macros: Lessons from Slint

Talkat Rust in Paris 2025 · on Wednesday, 2025-06-25· [rust, compilers-and-language-design]
slides:none on file

Describes how the slint! macro embeds a custom DSL into Rust, generates structs/getters/callbacks and compiles to Rust or C++; shows the cpp! macro workflow where build.rs extracts C++ snippets, compiles them and exposes lightweight bridge functions; explains the document_features! macro that reads Cargo.toml and emits feature docs; covers error reporting via compile_error spans and deprecated-attribute warnings, annotated-snippets for imported-file errors, heavy proc-macro deps (proc-macro2, syn, quote) and a working Slint Language Server that integrates with rust-analyzer and live preview.

AI-written summary · about

  1. 0:00Introduction to Slint
  2. 1:00Declarative macros
  3. 4:00Procedural macros
  4. 9:03Slint macro overview
  5. 11:24Parsing challenges
  6. 14:54Error reporting strategies
  7. 16:54Editor integration
  8. 18:57Additional macro use cases
  9. 22:49Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.