1 2 3 4 5 6 7 8 9 10 11 12
extern crate built; use std::env; fn main() { // Generate build information if let Ok(profile) = env::var("PROFILE") { println!("cargo:rustc-cfg=build={:?}", &profile); } built::write_built_file().expect("Failed to compile build information!"); }