pub struct Rustc { /* private fields */ }
Expand description
Configuration for the VERGEN_RUSTC_*
instructions
Instructions
The following instructions can be generated:
Instruction | Default |
---|---|
cargo:rustc-env=VERGEN_RUSTC_CHANNEL=nightly | * |
cargo:rustc-env=VERGEN_RUSTC_COMMIT_DATE=2021-02-10 | * |
cargo:rustc-env=VERGEN_RUSTC_COMMIT_HASH=07194ffcd25b0871ce560b9f702e52db27ac9f77 | * |
cargo:rustc-env=VERGEN_RUSTC_HOST_TRIPLE=x86_64-apple-darwin | * |
cargo:rustc-env=VERGEN_RUSTC_LLVM_VERSION=11.0 | * |
cargo:rustc-env=VERGEN_RUSTC_SEMVER=1.52.0-nightly | * |
- If the
channel
field is false, theVERGEN_RUSTC_CHANNEL
instruction will not be generated. - If the
commit_date
field is false, theVERGEN_RUSTC_COMMIT_DATE
instruction will not be generated. - If the
host_triple
field is false, theVERGEN_RUSTC_HOST_TRIPLE
instruction will not be generated. - If the
llvm_version
field is false, theVERGEN_RUSTC_LLVM_VERSION
instruction will not be generated. - If the
semver
field is false, theVERGEN_RUSTC_SEMVER
instruction will not be generated. - If the
sha
field is false, theVERGEN_RUSTC_COMMIT_HASH
instruction will not be generated. - NOTE - The
commit_date
filed is only a date, as we are restricted to the output fromrustc_version
- NOTE - The
VERGEN_RUSTC_LLVM_VERSION
instruction will only be generated on thenightly
channel, regardless of thellvm_version
field.
Example
use vergen::{vergen, Config};
let mut config = Config::default();
// Turn off the LLVM instruction
*config.rustc_mut().llvm_version_mut() = false;
// Generate the instructions
vergen(config)?;
Implementations
sourceimpl Rustc
impl Rustc
sourcepub fn enabled_mut(&mut self) -> &mut bool
pub fn enabled_mut(&mut self) -> &mut bool
Enable/Disable the rustc output
sourcepub fn channel_mut(&mut self) -> &mut bool
pub fn channel_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_RUSTC_CHANNEL
instruction
sourcepub fn commit_date_mut(&mut self) -> &mut bool
pub fn commit_date_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_RUSTC_COMMIT_DATE
instruction
sourcepub fn host_triple_mut(&mut self) -> &mut bool
pub fn host_triple_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_RUSTC_HOST_TRIPLE
instruction
sourcepub fn llvm_version_mut(&mut self) -> &mut bool
pub fn llvm_version_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_RUSTC_LLVM_VERSION
instruction
sourcepub fn semver_mut(&mut self) -> &mut bool
pub fn semver_mut(&mut self) -> &mut bool
Enable/Disable the VERGEN_RUSTC_SEMVER
instruction
Trait Implementations
impl Copy for Rustc
Auto Trait Implementations
impl RefUnwindSafe for Rustc
impl Send for Rustc
impl Sync for Rustc
impl Unpin for Rustc
impl UnwindSafe for Rustc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more