| 1 | use std::sync::OnceLock; |
| 2 | |
| 3 | static BUILD_VERSION: OnceLock<&'static str> = OnceLock::new(); |
| 4 | |
| 5 | pub fn set_build_version(version: &'static str) { |
| 6 | let _ = BUILD_VERSION.set(version); |
| 7 | } |
| 8 | |
| 9 | pub fn build_version() -> &'static str { |
| 10 | BUILD_VERSION.get().copied().unwrap_or("unknown") |
| 11 | } |