Skip to main content

Module version

Module version 

Source
Expand description

Build- and compiler-version constants and helpers captured at build time.

Constants§

BUILD_TIMESTAMP
UTC timestamp of when the crate was built.
GIT_DESCRIBE
Output of git describe for the build’s source revision.
GIT_SHA
Git commit SHA of the build’s source revision.
RUSTC_CHANNEL
Release channel of the rustc used to build the crate (e.g. stable).
RUSTC_COMMIT_DATE
Commit date of the rustc used to build the crate.
RUSTC_COMMIT_HASH
Commit hash of the rustc used to build the crate.
RUSTC_HOST_TRIPLE
Host target triple of the rustc used to build the crate.
RUSTC_LLVM_VERSION
LLVM version backing the rustc used to build the crate.
RUSTC_SEMVER
Semantic version of the rustc used to build the crate.

Functions§

semver
Returns the crate’s semantic version as declared in Cargo.toml.
version
Returns the crate version combined with the git describe string (e.g. 1.2.3-v1.2.3-4-gabcdef).