Skip to content
Rust Search
← Browse conferences

Reasoning about Rust: an introduction to Rustdoc's JSON format

EuroRust
24:11 2044 views

Macros are the primary mechanism for metaprogramming in Rust, either to perform code generation or enforce constraints at compile-time that are not easily captured by the type system (e.g. sqlx). Macros are also limited: their input is a stream of tokens, with no type-level information. Up until last year, you had to hook directly into the compiler internals to get a more featureful representation. This is no longer the case, thanks to Rustdoc's JSON format: an information-rich representation

Player unavailable or embedding blocked? Use the YouTube link above.