macro

Compile-time dependency trust

Procedural macro implementations execute as part of compilation and may access resources available to the compiler. Review their source and dependency graph before building; a lockfile helps reproduce resolution but does not establish trust. Use an isolated environment without credentials or network for reviewed fixtures. Example: two-crate workspace; see fixtures/proc-macro-workspace/consumer/src/bin/trust.rs. This caller is not a standalone rustc program. Expected stdout (not executed): '7\n' Common mistake: Assuming cargo check is harmless for arbitrary untrusted crates because it does not run the final application.

Formal Syntax & Structure

rust syntaxrust
[dependencies]teaching-macros = { path = "../teaching-macros" }

Working Example

Example Snippetrust
use teaching_macros::seven;fn main() { println!("{}", seven!()); }
Rust Reference