Mykhailo Maidan
Crafting Custom Frameworks with Rust: A Deep Dive into Procedural Macros
#1about 7 minutes
Exploring the power and pitfalls of Rust macros
Rust's metaprogramming capabilities allow for reducing boilerplate code, but macros can be complex to write, debug, and test.
#2about 6 minutes
Simplifying event handlers with custom attribute macros
An event-driven framework's API can be significantly simplified by using attribute macros to define event handlers and their corresponding events.
#3about 7 minutes
Overcoming unordered macro expansion with build-time metadata
To solve the problem of unordered macro expansion, a build script (`build.rs`) can analyze the source code and generate a metadata file before compilation.
#4about 8 minutes
Parsing crate source code with the `syn` crate
The `syn` and `syn-inline-mod` crates enable parsing an entire Rust crate into a single Abstract Syntax Tree (AST), which can then be analyzed using the visitor pattern.
#5about 5 minutes
Loading metadata and modifying the AST in macros
Procedural macros can load the pre-generated metadata from disk and use the `VisitMut` trait from `syn` to modify the AST, such as renaming functions to simulate overloading.
#6about 8 minutes
Evaluating the trade-offs of a metadata-driven macro framework
While this metadata-driven approach offers powerful compile-time checks and extensibility for tooling, it increases build times and implementation complexity.
#7about 12 minutes
Q&A on testing, nightly Rust, and framework design
The discussion covers practical considerations like the necessity of nightly Rust for certain features, strategies for testing complex macros, and potential runtime optimizations.
Related jobs
Jobs that call for the skills explored in this talk.
Dennemeyer Group
Hesperange, Luxembourg
Intermediate
Senior
.NET
Structured Query Language (SQL)
Matching moments
02:49 MIN
Using AI to overcome challenges in systems programming
AI in the Open and in Browsers - Tarek Ziadé
11:32 MIN
The industry's focus on frameworks over web fundamentals
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
09:00 MIN
Navigating the growing complexity of modern CSS
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
01:32 MIN
Organizing a developer conference for 15,000 attendees
Cat Herding with Lions and Tigers - Christian Heilmann
05:12 MIN
How to build structure and culture without killing agility
From Data Keeper to Culture Shaper: The Evolution of HR Across Growth Stages
03:16 MIN
Improving the developer feedback loop with specialized tools
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
03:05 MIN
Building collaborative design tools and the neo-brutalism trend
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
05:28 MIN
The origin story of the Polypane developer browser
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
Featured Partners
Related Videos
Reasoning about Rust: an introduction to Rustdoc's JSON format
Luca Palmieri
A Love Letter to Rust
Rainer Stropek
Eternal Sunshine of the Spotless Programming Language
Stefan Baumgartner
Interface Contracts in Microfrontend Architectures
Alexander Günsche
Microfrontends with Blazor: Welcome to the Party!
Florian Rappl
Rust Beyond Systems: Revolutionizing Web Development
Patrick Koss
Advanced Micro Frontends: Multi-Version and Multi-Framework Scenarios
Manfred Steyer
Get ready to Rustle
Marco Otte-Witte
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.








