metacrate/lib.rs
1#![warn(missing_docs)]
2
3//! This crate provides macros to attach metadata of the crate.
4
5meta!();
6
7/// Attaches metadata to the crate that called this macros.
8#[macro_export]
9macro_rules! meta {
10 () => {
11 #[doc(hidden)]
12 /// The metadata of the crate.
13 pub mod meta {
14 /// Version.
15 pub static VERSION: &str = env!("CARGO_PKG_VERSION");
16 /// List of authors.
17 pub static AUTHORS: &str = env!("CARGO_PKG_AUTHORS");
18 /// Name.
19 pub static NAME: &str = env!("CARGO_PKG_NAME");
20 /// Description.
21 pub static DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
22 }
23 };
24}