Crate build_info_build

Source
Expand description

This crate is used to collect build info for consumption by the build-info crate.

// Calling `build_info_build::build_script` collects all data and makes it available to `build_info::build_info!`
// and `build_info::format!` in the main program.
build_info_build::build_script();

§Features

The build-info-build crate has the following features:

  • git (enabled by default): Enables git support. A git repository will only be detected if this feature is available.

Re-exports§

pub use build_info_common::semver;

Structs§

BuildInfo
Information about the current build
BuildScriptOptions
Type to store any (optional) options for the build script.
CompilerInfo
rustc version and configuration
CrateInfo
Information about the current crate (i.e., the crate for which build information has been generated)
GitInfo
Information about a git repository

Enums§

CompilerChannel
rustc distribution channel (some compiler features are only available on specific channels)
DependencyDepth
Depth of dependencies to collect
OptimizationLevel
The various possible optimization levels
VersionControl
Support for different version control systems

Functions§

build_script
Call this function in your build.rs script to generate the data consumed by the build_info crate. Additional customization options are available by manipulating the return type. The actual work is performed once the return type is dropped.