A Practical Introduction to Derive Macros in Rust

preview_player
Показать описание
In this video, we will learn about derive macros in Rust, which is a subtype of procedural macros. We will code a simple example to understand the concept of derive macros. Also, we will delve into the world of procedural macros, the differences between procedural and declarative macros, and how procedural macros are generated during compile time. We will see a gentle introduction to the syn and quote crates as well.

Links:

Song Attributes:

Jazzy Hip Hop Boom Bap by Music Unlimited
Lofi Vibes by chillmore
Lofi Vintage by FASSounds
Sweet Chillhop by Music Unlimited
Untitled Lofi by hour

Follow me on my socials:

00:00 Introduction
01:30 Example Case
02:13 Manual Implementation
03:28 Writing Procedural Macros
09:09 Outro
Рекомендации по теме
Комментарии
Автор

Clear language, high level of explaining and simple to understand, neat slides. Liked and Subscribed.
Keep up the good work mate!

shimonpertz
Автор

I happened to chance upon your videos on reddit.

i had a hard time learning about macros from the book, and the clarity of your explanations is simply amazing.

thanks for all the tutorial videos!
they are of tremendous help!

I can't wait for your subsequent videos.

hahahehehh
Автор

Nice video, waiting for more on attribute and function macros

slava_in
Автор

Really good video - with syn and quote, writing powerful macros is more effortless.

cthutu
Автор

proud of finding this very good quality channel this early

yapayzeka
Автор

This is quality content. You explained the things which I considered complex with a simple example and easy words.

TON-vzpe
Автор

Short and easy to understand! Thank you very much!

dimiutube
Автор

Thank you SOOOO MUCH for making this!
The topic of proc-macros was intimidating for me to even approach because of my perceived difficulty and complexity of them.

With how concise and clear this is written and done, and even explaining all the nuisances, and the reasoning for each part, it really makes proc-macros way more approachable!

Huge thanks for taking the time to write and record this, its a HUGE help to get a understanding of what they really are, and how to start writing them~

proudbeme
Автор

This is really amazing tutorial! I also stumbled upon it in reddit. Great job! thank yo uso much!

omestredd
Автор

@0:20 Function-like macros can also be procedural, though all declarative macros are function-like. Declarative macros are macros defined via macro_rules! and procedural macros are defined via proc_macro and run arbitrary Rust.

yaksher
Автор

thanks! you deliver a very clear explanation.

jyhherng
Автор

Thanks for the vid! Can you tell me what color scheme you're using? It's very pleasing.

discobiscuit
Автор

Excellent explanation! Thank you. Just a bit too fast for me. Felt like some seconds in between the concepts where needed for thinking. Ofacause pause is an option.

kyrylogorbachov
Автор

Seems like visual studio is fighting you: you constantly have to clear out where it’s trying to be helpful

lukeskywalker
Автор

I followed allong until the !vec[#(#field_idents), *] syntax, that made my brain unhappy

wolfeygamedev