YoVDO

Nine Rules for Creating Procedural Macros in Rust - Lecture

Offered By: Rust via YouTube

Tags

Unit Testing Courses Code Generation Courses API Design Courses Metaprogramming Courses Syntax Trees Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Discover nine practical rules for creating procedural macros in Rust in this 45-minute conference talk by Carl Kadie at Rust Linz, December 2022. Learn how to develop macros as normal projects, convert between strings, syntax trees, and literal code, create debuggable unit tests, and understand and manipulate Rust syntax trees. Explore the principles of elegant Rust API design and gain insights from the anyinput macro, which simplifies accepting various input types. Access accompanying slides and a free article in Towards Data Science for additional resources. By following these guidelines, transform the process of writing macros into an experience as straightforward as developing a regular Rust program that manipulates large, nested structs.

Syllabus

Nine Rules for Creating Procedural Macros in Rust
Talk's Approach: 9 "Rules"
Develop as a normal (non-macro) project
Convert freely: Strings, Syntax trees, Literal code
Create debuggable unit tests
Understand Rust syntax trees
Recursively manipulate syntax trees
Follow the rules of elegant Rust API design
Conclusion: Follow these 9 rules and ... writing macros as easy as writing a regular Rust program ... that manipulates large, nested structs.


Taught by

Rust

Related Courses

Google Cloud Apigee Certified API Engineer
A Cloud Guru
Amazon API Gateway para las aplicaciones sin servidor (Español LATAM) | Amazon API Gateway for Serverless Applications (Spanish from Latin America)
Amazon Web Services via AWS Skill Builder
Amazon API Gateway para las aplicaciones sin servidor (Español LATAM) | Amazon API Gateway for Serverless Applications (Spanish from Latin America)
Amazon Web Services via AWS Skill Builder
Building Modern Nodejs Applications on AWS
Amazon Web Services via edX
API Design and Fundamentals of Google Cloud's Apigee API Platform
Google via Google Cloud Skills Boost