Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Procedural Macros in Rust (part 1) в хорошем качестве

Procedural Macros in Rust (part 1) 5 лет назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Procedural Macros in Rust (part 1)

In this stream, we take a look at Rust's procedural macros. These are much more flexible than the declarative macros you get with the macro_rules! construct, and effectively allow you to write source-code transformations as a separate program. Take a look at https://doc.rust-lang.org/book/ch19-0... and https://doc.rust-lang.org/nightly/ref... for details. In particular, we follow David Tolnay's excellent proc-macro workshop from Rust Latam back in March 2019: https://github.com/dtolnay/proc-macro.... The goal is to implement the custom derive(Builder) project (the first one listed). We managed to get all the way through and then some! For tools, we ended up relying quite heavily on David's https://github.com/dtolnay/syn and https://github.com/dtolnay/quote, as well as the very handy cargo-expand tool: https://github.com/dtolnay/cargo-expand. You can find the code over at https://github.com/jonhoo/proc-macro-.... Oh, and the issue with formatting doc comments we encountered at the end has already been fixed @ https://github.com/rust-lang/rustfmt/... ! You can see the live version with comments at    • Procedural Macros in Rust (part 1 -- ...  

Comments