Struct re_build_info::BuildInfo
source · pub struct BuildInfo {
pub crate_name: &'static str,
pub version: CrateVersion,
pub rustc_version: &'static str,
pub llvm_version: &'static str,
pub git_hash: &'static str,
pub git_branch: &'static str,
pub is_in_rerun_workspace: bool,
pub target_triple: &'static str,
pub datetime: &'static str,
}Expand description
Information about the build of a Rust crate.
Create this with crate::build_info!.
The git_ fields are all empty on failure. Most likely git fails because we’re not in a git repository
to begin with, which happens because we’ve imported the published crate from crates.io.
There are a few other cases though, like
gitis not installed- the user downloaded rerun as a tarball and then imported via a
path = …import - others?
Fields§
§crate_name: &'static strCARGO_PKG_NAME
version: CrateVersionCrate version, parsed from CARGO_PKG_VERSION, ignoring any +metadata suffix.
rustc_version: &'static strThe raw version string of the Rust compiler used, or an empty string.
llvm_version: &'static strThe raw version string of the LLVM toolchain used, or an empty string.
git_hash: &'static strGit commit hash, or empty string.
git_branch: &'static strCurrent git branch, or empty string.
is_in_rerun_workspace: boolTrue if we are building within the rerun repository workspace.
This is a good proxy for “user checked out the project and built it from source”.
target_triple: &'static strTarget architecture and OS
Example: xaarch64-apple-darwin
datetime: &'static strISO 8601 / RFC 3339 build time.
Example: "2023-02-23T19:33:26Z"
Empty if unknown.