pub struct Cargo { /* private fields */ }
Expand description
Configuration for the VERGEN_CARGO_*
instructions
Instructions
The following instructions can be generated:
Instruction | Default |
---|---|
cargo:rustc-env=VERGEN_CARGO_TARGET_TRIPLE=x86_64-unknown-linux-gnu | * |
cargo:rustc-env=VERGEN_CARGO_PROFILE=debug | * |
cargo:rustc-env=VERGEN_CARGO_FEATURES=git,build | * |
- If the
features
field is false, the features instruction will not be generated. - If the
profile
field is false, the profile instruction will not be generated. - If the
target_triple
field is false, the target triple instruction will not be generated. - NOTE - the
target_triple
instruction can differ from thehost_triple
instruction, i.e. during cross compilation
Example
use vergen::{vergen, Config};
let mut config = Config::default();
// Turn off the features instruction
*config.cargo_mut().features_mut() = false;
// Generate the instructions
vergen(config)?;
Implementations§
source§impl Cargo
impl Cargo
sourcepub fn enabled_mut(&mut self) -> &mut bool
pub fn enabled_mut(&mut self) -> &mut bool
Enable/Disable the cargo output
sourcepub fn features_mut(&mut self) -> &mut bool
pub fn features_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_CARGO_FEATURES
instruction
sourcepub fn profile_mut(&mut self) -> &mut bool
pub fn profile_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_CARGO_PROFILE
instruction
sourcepub fn target_triple_mut(&mut self) -> &mut bool
pub fn target_triple_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_CARGO_TARGET_TRIPLE
instruction