Skip to main content

git_hash

Function git_hash 

Source
pub fn git_hash() -> &'static str
Expand description

Git commit SHA the binary was built from, or "unknown" for a build with no reachable .git tree (e.g. a cargo package / crates.io build). Stamped by build.rs via cargo:rustc-env=GIT_HASH; env! resolves here because the rustc-env applies to THIS crate’s compilation. Surfaced in keyhog --version and meant to be embedded in every result so a scan traces back to an exact commit (MC-06: the false “F1 regression” was a stale binary benched against HEAD, undetectable while every build reported the same empty version).