feat(code-rs): add forked workspace and dual build support

This commit is contained in:
James Peter
2025-10-05 04:27:49 +10:00
parent 0029ec4de5
commit c8111bbb03
1066 changed files with 233191 additions and 45 deletions
+14
View File
@@ -0,0 +1,14 @@
// Compile-time embedded version string.
// Prefer the CODE_VERSION provided by CI; fall back to the package
// version for local builds.
pub const CODE_VERSION: &str = {
match option_env!("CODE_VERSION") {
Some(v) => v,
None => env!("CARGO_PKG_VERSION"),
}
};
#[inline]
pub fn version() -> &'static str {
CODE_VERSION
}