Skip to content
Rust Search
← EuroRust 2025

What actually are attributes?

EuroRust
27:38 1690 views

Attributes are a super versatile tool. They can add metadata to almost any part of rust’s syntax. This is great for designing new features in the language: if their syntax can just be an attribute, the parser and therefore high-level syntax doesn’t need to change. And that’s not just useful inside the compiler; Rust gives that power to users through attribute macros, so they can add their own syntax to the language. Think of serde to add serialization, or tokio’s attribute that lets main be asyn

Player unavailable or embedding blocked? Use the YouTube link above.