MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / get_platform

Function get_platform

ch_11/build.rs:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30fn get_platform() -> String {
31 let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
32 let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
33 let env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
34 let env_dash = if env.is_empty() { "" } else { "-" };
35
36 format!("{}-{}{}{}", arch, os, env_dash, env)
37}
38
39fn get_version(impl_commit: &str) -> String {
40 let commit_dash = if impl_commit.is_empty() { "" } else { "-" };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected