Expand description
§opentalk-version
Collect a set of build information and make it available for printing.
§Example usage:
Add the following to your build.rs
fn main() -> anyhow::Result<()> {
opentalk_version::collect_build_information()
}Once this is added, you can access the build information in your crate like this:
ⓘ
// This adds a `build_info` module which contains a `BuildInfo` struct that
// contains all collected build information.
use build_info::BuildInfo;
use opentalk_version::InfoArgs;
opentalk_version::build_info!();
pub(super) fn print_version(args: &InfoArgs) {
let build_info = BuildInfo::new();
if let Some(text) = build_info.format(&args) {
println!("{text}");
}
}
Macros§
- build_
info - This macro will expand to a module
build_infowhich contains a structBuildInfo. The struct can be used to access build information.
Structs§
Functions§
- collect_
build_ information - Collects the information that can be used later to identify the version of this crate.