macro_rules! major {
() => { ... };
}Expand description
Get the major version of your package in a constant expression.
ยงExample
const VERSION_MAJOR: u32 = const_pkg_version::major!();You can also limit the value to something lower than a u32.
This will generate a compile error if the version is too high:
const VERSION_MAJOR: u8 = const_pkg_version::major!();