Add the #[macro_export] attribute above your macro_rules! definition to make the macro available to other crates that depend on yours.
#[macro_export]
macro_rules! vec {
( $( $x:expr ),* ) => {
{
let mut temp_vec = Vec::new();
$(
temp_vec.push($x);
)*
temp_vec
}
};
}