Learning Rust: Procedural Macros

preview_player
Показать описание
This is part 2 of an ongoing series of my efforts to learn the programming language Rust. I give you a quick overview on how to create a simple procedural macro.
The final code can be found here:

Contact:

#rustlang
Рекомендации по теме
Комментарии
Автор

From someone who was trying to get his head around quote, syn, and procedural macros for the first time, this was super helpful. Thank you! I have subscribed- keep the great content coming.

fabiomencoboni
Автор

Wow, this is the exact problem I try to tackle for a long time! It will jumpstart my progress. Subbed!

yumbuboyumbubo
Автор

You don't need to make a closure right 'filter_map(|field| get_entity_field(field))'? should work?

johanngambolputty
Автор

This is exactly what I've been looking for. Great videos. You never miss. Thanks so much.

NeotenicApe
Автор

Great video! I am less scared to touch them now :)
One question: I always assumed that the derive macro is used to autogenerate trait implementations. Here you inject the select directly into the Book struct implementation block. Is this common procedure, or just to keep it simple for a start?

kiffeeify
Автор

fantastic video, excellent explanations and editing. Because you obviously are a great coder I am thinking that you must have a pretty streamlined video editing process, and you picked your tools carefully. Could you share more about those? I need to put myself out there and learn by sharing videos, but the editing part is what bothers me most. How can you deliver such clean videos? Right now the only tools I have are obs studio and blender

MMABeijing
Автор

Thanks for the video! Is there any reason you used the match statement instead of the `?` operator?

verified_tinker
Автор

If I understand correctly, there is no need to match field.ident in get_entity_field function as we've already matched fields to be named, so simply .unwrapping that Option will be fine.

adsick_ua
Автор

I’m still to wrap my head around all the things he blew by the explanation

boringlymines
Автор

Nice tutorial on the topic but the inlay hint is quite messy and is distracting.

NeevekEst
Автор

I love your fish/vim setup. Make a full tutorial on that? rustlang is the best! Hope it has this niche and small fanbase forever instead of becoming mainstream.

pinch-of-salt
Автор

Nice tutorial. But please turn off the music completely next time because your explanations are more important than the music

hirisraharjo
Автор

Als du deinen Namen gesagt hast war ich mir zu 100% sicher ich hätte auf ein deutsches Video geklickt. Ich war richtig schockiert als du auf einmal englisch geredet hast.

Florian-shnf