#RustMacros

N-gated Hacker Newsngate
2025-10-17

๐ŸŽ‰ Ah, the joys of wading through Rust macrosโ€”because who doesn't love a programming language that requires you to conjure syntax wizardry just to avoid writing actual code? ๐Ÿ™„ But don't worry, the author promises this isn't about any *useful* macros. Instead, it's a nostalgic journey back to Lisp days, where a single screen of code could *almost* do something! ๐Ÿ˜‚
hackeryarn.com/post/rust-macro

Rust in Paris ๐Ÿฆ€ Confrustinparis
2025-08-09

๐ŸŽฅ New Video Online โ€“ Rust in Paris 2025 ๐Ÿฆ€

At the latest edition of Rust in Paris, Olivier Goffart delivered a fascinating talk on the power of Rust macros, sharing lessons learned from building Slint and other innovative projects.

๐Ÿ‘‰ Watch the full talk here: youtu.be/vE9EH1kOXOU

Huge thanks to Olivier for his expertise, creativity, and contributions to the Rust community ๐Ÿ™Œ

N-gated Hacker Newsngate
2025-04-28

๐Ÿš€๐ŸŽญ "Autarkie: Because who doesn't want to complicate grammar checking with Rust macros?" ๐Ÿ› ๏ธ๐Ÿค” Just what we all needed: a tool to fuzz grammar instantly... in a language nobody asked for! ๐Ÿ™ˆ๐Ÿ’ฅ
github.com/R9295/autarkie

2024-11-05

Curious about Rust macros? ๐Ÿฆ€ Check out our latest #eurorust24 video, where Sam Van Overmeire, Cloud Developer at DPGMediaIT and author of Powerful Rust Macros, breaks down Rustโ€™s meta-programming superpowersโ€”from cutting boilerplate to crafting custom procedural macros. If you've been thinking about harnessing Rust's full potential, this is your guide!

Watch it here ๐Ÿ“น๐Ÿ‘‰ youtu.be/02vpyrR1hqk

#rustlang #rustmacros #rustbook

2024-10-07

โšก #Rustlang Tip: cargo expand - Your X-ray Vision for Macros!

cargo expand allows you to see the expanded code generated by macros, providing more insight into what's happening under the hood.

Learn more here: docs.rs/crate/cargo-expand/0.1

#RustMacros #Rust30by30 #Day13

macro_rules! create_function {     ($func_name:ident) => {         fn $func_name() {             println!("You called {:?}()", stringify!($func_name));         }     }; }  create_function!(foo); create_function!(bar);  fn main() {     foo();     bar(); }// notice how all the imports are revealed! #![feature(prelude_import)] #[prelude_import] use std::prelude::rust_2021::*; #[macro_use] extern crate std;  // notice how the function bodies are shown! fn foo() {     {         ::std::io::_print(format_args!("You called {0:?}()\n", "foo"));     }; } fn bar() {     {         ::std::io::_print(format_args!("You called {0:?}()\n", "bar"));     }; } fn main() {     foo();     bar(); }

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst