Expand description
Build-time git provenance captured by build.rs and exposed
as compile-time constants.
Two binaries built from different commits of the same crate version are
otherwise indistinguishable by crate::VERSION alone; this module carries
the commit SHA, dirty flag, commit date, and build timestamp so a resident
daemon can report exactly which code it is running (#1374). Every git-derived
value is optional: a build made outside a git checkout (a crates.io download
or release tarball) simply reports None, and every consumer degrades
gracefully. See Provenance.
Structs§
- Provenance
- Git provenance of the running binary, surfaced on the daemon
status/pingwire and inomni-dev --version.
Constants§
- GIT_
COMMIT_ DATE - Committer date of the built commit in strict ISO-8601, or
Noneoutside a checkout. - GIT_SHA
- Full 40-character commit SHA the binary was built from, or
Nonewhen built outside a git checkout. - GIT_
SHA_ SHORT - Abbreviated commit SHA (e.g.
a6d304fd), orNoneoutside a checkout.
Functions§
- build_
timestamp - Build timestamp formatted as an RFC3339 (UTC) string, or
Nonewhen the build script recorded no clock reading. - git_
dirty - Whether the working tree had uncommitted changes at build time.
- long_
version - Long version string for
omni-dev --version: the crate version plus git provenance when available, e.g.0.36.0 (a6d304fd 2026-07-20, dirty). - provenance
- Snapshots this binary’s compile-time provenance into an owned
Provenance.