Wire Forge-native release infrastructure
Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s

This commit is contained in:
Conrad Kramer 2026-06-07 05:51:12 -07:00
parent 97c569fb35
commit 002bd382e9
199 changed files with 14268 additions and 185 deletions

View file

@ -0,0 +1,61 @@
#![deny(missing_debug_implementations)]
/// Version of the Rust core linked into platform shells.
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
/// Platform family reported by the current Rust target.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PlatformFamily {
Android,
Apple,
Linux,
Windows,
Other,
}
impl PlatformFamily {
pub fn current() -> Self {
if cfg!(target_os = "android") {
Self::Android
} else if cfg!(target_vendor = "apple") {
Self::Apple
} else if cfg!(target_os = "linux") {
Self::Linux
} else if cfg!(target_os = "windows") {
Self::Windows
} else {
Self::Other
}
}
pub fn as_str(self) -> &'static str {
match self {
Self::Android => "android",
Self::Apple => "apple",
Self::Linux => "linux",
Self::Windows => "windows",
Self::Other => "other",
}
}
}
/// Human-readable core identity for stubs and smoke tests.
pub fn identity() -> String {
format!(
"burrow-core/{} ({})",
version(),
PlatformFamily::current().as_str()
)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn identity_includes_project_name() {
assert!(identity().starts_with("burrow-core/"));
}
}