use lazy_static::lazy_static;
lazy_static! {
pub static ref NUM_CPU: String = num_cpus::get().to_string();
}
pub mod built_info {
use lazy_static::lazy_static;
include!(concat!(env!("OUT_DIR"), "/built.rs"));
fn get_software_version() -> String {
let prefix = if let Some(s) = GIT_COMMIT_HASH {
format!("{PKG_VERSION}-{}", s[0..8].to_owned())
} else {
PKG_VERSION.to_string()
};
let suffix = match GIT_DIRTY {
Some(true) => "-dirty",
_ => "",
};
format!("{prefix}{suffix}")
}
lazy_static! {
pub static ref VERSION: String = get_software_version();
}
}