aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart-core/src')
-rw-r--r--crates/mozart-core/src/http.rs3
-rw-r--r--crates/mozart-core/src/lib.rs2
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/mozart-core/src/http.rs b/crates/mozart-core/src/http.rs
index 7d3de8e..907b6a7 100644
--- a/crates/mozart-core/src/http.rs
+++ b/crates/mozart-core/src/http.rs
@@ -1,3 +1,4 @@
+use crate::MOZART_VERSION;
use std::path::{Path, PathBuf};
use std::sync::OnceLock;
@@ -9,7 +10,7 @@ use anyhow::{Context, Result, anyhow, bail};
pub fn user_agent() -> String {
format!(
"Mozart/{} ({}; {})",
- env!("CARGO_PKG_VERSION"),
+ MOZART_VERSION,
std::env::consts::OS,
std::env::consts::ARCH,
)
diff --git a/crates/mozart-core/src/lib.rs b/crates/mozart-core/src/lib.rs
index 5383d9a..bc0da53 100644
--- a/crates/mozart-core/src/lib.rs
+++ b/crates/mozart-core/src/lib.rs
@@ -10,3 +10,5 @@ pub mod wildcard;
pub use mozart_console_macros::console_format;
pub use wildcard::matches_wildcard;
+
+pub const MOZART_VERSION: &str = env!("CARGO_PKG_VERSION");