pub const VERSION: &str = "1.0.0";Expand description
Crate version string, populated by Cargo at build time.
Useful for diagnostics, startup banners, and tests that need to assert the crate metadata seen by Cargo.
§Examples
Compare the exported value with Cargo’s package version:
assert_eq!(type_lib::VERSION, env!("CARGO_PKG_VERSION"));Embed the version in generated output:
let banner = format!("type-lib {}", type_lib::VERSION);
assert!(banner.starts_with("type-lib "));