macro_rules! build_info {
() => { ... };
}Expand description
The application’s build info, as a &'static BuildInfo. Expands in the
calling crate, so the name and version are the application’s. An
application that never called build::emit still
compiles, with the commit, time, target, and rustc unknown (E-60).
let build: &'static sys_lib::BuildInfo = sys_lib::build_info!();
assert_eq!(build.name, env!("CARGO_PKG_NAME"));
if build.dirty == Some(true) {
eprintln!("warning: built from uncommitted changes");
}