BlueGit

ict rusty-teams

Files

rusty-teams / crates / app-base / src / version.rs

version.rs

refactor(app): extract app-base crate
metis Daniel Däschle · pushed by metis · 6 weeks ago
16e522c2 History
version.rs 281 B Download Raw
1use std::sync::OnceLock;
2
3static BUILD_VERSION: OnceLock<&'static str> = OnceLock::new();
4
5pub fn set_build_version(version: &'static str) {
6 let _ = BUILD_VERSION.set(version);
7}
8
9pub fn build_version() -> &'static str {
10 BUILD_VERSION.get().copied().unwrap_or("unknown")
11}