#[export_macro] macro_rules! foo { () => {}; } // You can use it like so: use my_crate::foo; // Notice that the macro is exported at the root