Skip to main content

emit

Function emit 

Source
pub fn emit()
Expand description

Emits the build facts for build_info!. Call it from the application’s build.rs. Never fails and never panics.

It records the git commit and whether the tree was dirty, the build time (SOURCE_DATE_EPOCH when set, for reproducible builds), the profile, target, rustc version, and enabled features. It does not record the build machine’s host name, user, or source path.

It asks Cargo to re-run the build script when the git HEAD, the current ref, the index, src/, build.rs, or Cargo.toml change, or when SOURCE_DATE_EPOCH does.