filmov
tv
A Practical Introduction to Declarative Macros in Rust
Показать описание
In this video, we'll give you a practical introduction to declarative macros in Rust. We'll start with a simple example to help you understand what declarative macros are and how they can be written. We'll then explore positional, infinite positional, and named parameters in declarative macros, as well as fragment specifiers of parameters. By the end of this video, you'll have a solid understanding of declarative macros in Rust and how you can use them to make your code more concise and maintainable.
The background music for this video includes "Jazzy Hip Hop Boom Bap" and "Sweet Chillhop" by Music Unlimited, "Lofi Vintage" and "Street Food" by FASSounds.
Don't forget to follow me on my social media accounts:
Hashtags: #macros #declarative #rust #rustlang #metaprogramming
00:00 Introduction
00:06 What is a macro?
00:56 Warnings
01:38 Example project
01:58 Creating the project
02:07 A simple macro with positional parameters
02:42 Parameter types for declarative macros
03:26 Desugaring the macros with rust-analyzer
03:49 Another simple macro
04:07 Named parameters in declarative macros
05:06 Infinite positional parameters in declarative macros
06:33 Using macros outside a crate
06:47 Exporting macros to be used outside the crate
06:45 Using macros outside a crate (again)
07:15 Ending
The background music for this video includes "Jazzy Hip Hop Boom Bap" and "Sweet Chillhop" by Music Unlimited, "Lofi Vintage" and "Street Food" by FASSounds.
Don't forget to follow me on my social media accounts:
Hashtags: #macros #declarative #rust #rustlang #metaprogramming
00:00 Introduction
00:06 What is a macro?
00:56 Warnings
01:38 Example project
01:58 Creating the project
02:07 A simple macro with positional parameters
02:42 Parameter types for declarative macros
03:26 Desugaring the macros with rust-analyzer
03:49 Another simple macro
04:07 Named parameters in declarative macros
05:06 Infinite positional parameters in declarative macros
06:33 Using macros outside a crate
06:47 Exporting macros to be used outside the crate
06:45 Using macros outside a crate (again)
07:15 Ending
Комментарии