Struct vergen::Cargo [−][src]
pub struct Cargo { /* fields omitted */ }
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
Enable/Disable the cargo output
Enable/Disable the VERGEN_CARGO_FEATURES
instruction
Enable/Disable the VERGEN_CARGO_PROFILE
instruction
Enable/Disable the VERGEN_CARGO_TARGET_TRIPLE
instruction
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cargo
impl UnwindSafe for Cargo
Blanket Implementations
Mutably borrows from an owned value. Read more