about this book
The goal of this book is to teach the advantages, disadvantages, and common use cases of Rust macros. The reader will learn what makes #[derive(Debug)] work, how tokio transforms an asynchronous main function, or how yew checks HTML for errors. They will write macros to avoid boilerplate and duplication or Domain-Specific Languages that make everyone else’s life easier and—this is Rust after all—safer. Tests will help you ensure the correct behavior of those macros, while precise error messages give users a great idea of what goes wrong when they leave the happy path. Debugging issues arise frequently, and it’s an experience that teaches us to better handle issues with other people’s macros. As a bonus, the reader will probably ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access