Procedural Macros in Rust

preview_player
Показать описание
The ultimate Rust lang tutorial. Follow along as we go through the Rust lang book chapter by chapter.

Chapters:
0:00​ Intro
0:42 Procedural Macros
9:09 Attribute-like macros
10:19 Function-like macros
10:58 Outro

#letsgetrusty​​ #rust​lang​ #tutorial
Рекомендации по теме
Комментарии
Автор

Yes, I would like to see more videos on macros. They are a very powerful tool

magnoelmagnifico
Автор

Probably worth mentioning that its a good idea to write complex procedural macros with proc_macro2, because that allows the logic to be used outside of your macros, and allows for creating tests that are difficult to write otherwise.

tserica
Автор

This series should be the official rust video tutorial. Very precise, concise and clear.

evidgamer
Автор

Phew!!! That's a lot of stuff but the best explanation about the different types of macros so far... to be honest, I didn't know what to search for to get information about a term like "#[route(GET, "/")] because I didn't know how it is called 🤦‍♀ You videos a always a good starting point and most of the stuff is absolutely clear then... Thanks!!

dimiutube
Автор

F***Ing amazing! Best explanation for macros I've ever found! It had been complicated to find a clear explanation about this and it has been very helpful. Lots of thanks for your work! 🙌

nko
Автор

Excellent video! I think it would be nice a video exploring different examples and problems that implement macros, specially attribute like macros and function like macros.

bonkbonk
Автор

This really helped me understand derive macros, thanks so much!

cj
Автор

Ok these are unbelievably powerful. I thought the macro system would be worse than a language like c because theyre trying to make it safer. I definitely didnt expect to be able to define my own language inside them

KayOScode
Автор

2:24 "We'll discuss why we'll need to bring two crates into scope in just a second"

Was this ever explained? Sorry if I had missed it.

uowemegrand
Автор

It's a little complicated... Can you spend some time elaborating with possible examples

cappedvillain
Автор

Rust macros are powerful and neat from consumer perspective, on the other hand some of them makes code flow less obvious and code inspection harder.

netify
Автор

Great series I had ever seen please add some more Projects too that would be more helpful thanks

allaboutworld
Автор

procedural macros for the gainzzz, buraaahh !!!

voidwalker
Автор

Hello, I came from C++, and don't understand some things. Is using macros a good choice in Rust code? Are there some disadvantages? Should I first try to implement macro using basic macros, and only if that failed I should try to use procedural macros?

arjentix
Автор

How do I write a procedural macro which supports struct both with and without lifetime annotations?

in_action
Автор

How do you bring HelloMacro into scope 6:29? Should the derive crate have the macro on as dep?

workflowinmind
Автор

macros are hard to understand... honestly i still confuse and lost

subhamprasad
Автор

How much time does it cost for you to produce 1 video every time? (preparation included)

arimcbrown
Автор

Hey Bogdan! I think you're doing really great by making these videos for the rustaceans! But I do have a query about the std::io.. can you make a video about the inputs in rust.. to take different types inputs like int, long long, float, double etc.. It will be really great if this topic will be covered.. - New rustacean (rustling maybe)

rootkill
Автор

Nice, macros we're some obscure to me yet and i Will be thansfull if You can show more abour

pineiden