WeAreDevelopers LIVE Jan 25, 2024

Crafting Custom Frameworks with Rust: A Deep Dive into Procedural Macros

Mykhailo Maidan

Stop writing dense boilerplate for event-driven Rust apps. Discover how advanced procedural macros and AST parsing can simulate function overloading behind beautifully clean APIs.

Pause
Mute Enter Fullscreen
#1 about 2 min

Evaluating the advantages of Rust macros for boilerplate reduction

Generating boilerplate code dynamically during build time simplifies developer tools.

#2 about 2 min

Navigating the disadvantages and maintenance costs of procedural macros

Debugging and testing limitations increase the complexity of maintaining custom frameworks.

#3 about 4 min

Exploring declarative and procedural macro subtypes in Rust environments

Procedural macros manipulate abstract syntax trees to implement complex meta-programming behaviors.

#4 about 7 min

Designing an event-driven framework using custom procedural macros

Replacing repetitive interface implementations with attribute macros streamlines simulated event handlers.

#5 about 3 min

Solving macro expansion order issues with custom metadata generation

Saving abstract tree states before compilation ensures expanding macros share necessary contextual information.

#6 about 4 min

Implementing a metadata analyzer inside Rust build scripts

Analyzing abstract syntax trees inside build scripts captures essential architectural requirements before compilation.

#7 about 4 min

Parsing Rust implementations using the Syn crate and inline modules

Combining syntax tree parsers and environment paths extracts crate contexts comprehensively across isolated modules.

#8 about 4 min

Extracting syntax tree semantics with the Syn visitor trait

Traversal functions validate structural implementations during metadata collection to enforce mandatory compile-time constraints.

#9 about 3 min

Managing disk storage for crate metadata and framework configuration

Serializing crate structures to local dependency directories ensures isolated and predictable macro execution.

#10 about 4 min

Modifying token streams to safely override framework function names

Mutable token stream visitors alter internal structures to simulate unsupported language features like overloading.

#11 about 6 min

Evaluating developer experience tradeoffs within custom macro frameworks

Strict compile-time validation yields safe usage patterns but introduces higher build times and testing friction.

#12 about 3 min

Visualizing complex event architectures using extracted procedural macro metadata

Utilizing parsed definitions produces interactive diagrams mapping interconnected dependencies and event subscriptions.

#13 about 12 min

Addressing ecosystem integration, testing friction, and platform compatibility challenges

Leveraging specific diagnostic strategies alongside compiler configurations overcomes constraints in complex meta-programming workflows.

Matching moments

5:24 min

Abstracting shared behaviors using traits and custom macros

Rainer Stropek Rainer Stropek · WWC 2021

7:35 min

Limitations of type systems and procedural macros

Luca Palmieri · LIVE

9:46 min

Exploring the rising adoption and versatility of Rust

Chris Heilmann +2 · LIVE

2:40 min

Why learning Rust offers strategic advantages for web developers

Francesco Ciulla Francesco Ciulla · Coffee With Developers

1:41 min

Looking toward the future abstraction levels of Rust frameworks

Marco Otte-Witte · WWC 2023

1:33 min

Balancing custom abstractions with declarative template environments

Robert Hoffmann Robert Hoffmann · WWC 2022

Upcoming sessions on this topic

Open session

World Congress 2026 North America

GitHub’s Team X-Ray: Your Repository Knows More About Your Team Than Your Team Does

Andrea Griffiths

Senior Developer Advocate

Andrea Griffiths
Open session

World Congress 2026 North America

Honey, look! I vibe-coded an OS!

Ian Smith

CTO, LYOS

Ian Smith
Open session

World Congress 2026 North America

Designing APIs That Survive AI Agents at Scale

Phani Pendurthi

Mastercard, Principal Software Engineer

Phani Pendurthi
Open session

World Congress 2026 North America

MicroAgents: The Microservices of the Agentic Era

Ashish Shubham

Runs the show bussiness at ThoughtSpot

Ashish Shubham
Open session

World Congress 2026 North America

When Humans Stop Writing Code: Rethinking Languages, Compilers, and Responsibility

Simon Auer

Organizer of flutter vienna meetup and CEO of marqably

Simon Auer
Open session

World Congress 2026 North America

Beyond Vibe Coding: An AI Builder’s Guide to Migrating 10k+ React Components

Shubham Chaurasia

Senior Software Engineer @ Meta

Shubham Chaurasia