Skip to content
Rust Search
← Browse conferences

Parsing Rust Code Considered Harmful

EuroRust
26:54 1262 views

Sasha Pourcelot CS Student, Software Engineer at Trustinsoft Sasha discusses the different static analysis techniques that were used in the development of cargo-breaking. We’ll start with basic Rust code parsers and show that, although being super simple, they require complex manipulations when it comes to import resolution and dependency handling. Then we’ll use the Rust compiler as a library and dive deep in its internal API. While this approach allows us to capture all the subtilities of a

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

Other talks by Sasha Pourcelot

Proving macro expansion with expandable

EuroRust
21:27 1206 views

Macros are a very powerful Rust feature. They allow developers to quickly and easily build domain-specific languages, with no runtime cost. However, the Rust compiler does surprisingly few checks on macros. For instance, it happily accepts a macro whose expansion is not syntactically valid, which makes them hard to debug. In this talk, we will see how expandable allows to check at compile time that a macro always expands to valid code and give a brief explanation under the hood. Finally, we’ll see a few techniques expandable uses to generate excellent error messages.