oci_spec/runtime/
version.rs

1/// API incompatible changes.
2pub const VERSION_MAJOR: u32 = 1;
3
4/// Changing functionality in a backwards-compatible manner
5pub const VERSION_MINOR: u32 = 0;
6
7/// Backwards-compatible bug fixes.
8pub const VERSION_PATCH: u32 = 2;
9
10/// Indicates development branch. Releases will be empty string.
11pub const VERSION_DEV: &str = "";
12
13/// Retrieve the version as string representation.
14pub fn version() -> String {
15    format!("{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_PATCH}{VERSION_DEV}")
16}
17
18#[cfg(test)]
19mod tests {
20    use super::*;
21
22    #[test]
23    fn version_test() {
24        assert_eq!(version(), "1.0.2".to_string())
25    }
26}