[][src]Struct mmrbi::cargo::script::Env

pub struct Env {
    pub cargo: PathBuf,
    pub cargo_manifest_dir: PathBuf,
    pub cargo_manifest_links: Option<OsString>,
    pub cargo_cfg_unix: bool,
    pub cargo_cfg_windows: bool,
    pub cargo_cfg_target_family: String,
    pub cargo_cfg_target_os: String,
    pub cargo_cfg_target_arch: String,
    pub cargo_cfg_target_vendor: String,
    pub cargo_cfg_target_env: String,
    pub cargo_cfg_target_pointer_width: String,
    pub cargo_cfg_target_endian: String,
    pub cargo_cfg_target_features: BTreeSet<String>,
    pub out_dir: PathBuf,
    pub target: String,
    pub host: String,
    pub num_jobs: String,
    pub opt_level: String,
    pub profile: String,
    pub rustc: PathBuf,
    pub rustdoc: Option<PathBuf>,
    pub rustc_linker: Option<PathBuf>,
}

Fields

cargo: PathBuf

Path to the cargo binary performing the build.

cargo_manifest_dir: PathBuf

The directory containing the manifest for the package being built (the package containing the build script). Also note that this is the value of the current working directory of the build script when it starts.

cargo_manifest_links: Option<OsString>

The manifest links value.

cargo_cfg_unix: boolcargo_cfg_windows: boolcargo_cfg_target_family: String

The target family (windows, unix)

cargo_cfg_target_os: String

The target operating system (windows, macos, ios, linux, android, freebsd, dragonfly, openbsd, netbsd, ...)

cargo_cfg_target_arch: String

The CPU target architecture (x86, x86_64, mips, powerpc, powerpc64, arm, aarch64, ...)

cargo_cfg_target_vendor: String

The target vendor (apple, fortanix, pc, unknown, ...)

cargo_cfg_target_env: String

The target environment ABI (blank, gnu, msvc, musl, sgx, ...)

cargo_cfg_target_pointer_width: String

The CPU pointer width (16, 32, 64, ...)

cargo_cfg_target_endian: String

The CPU target endianness (little, big, ...)

cargo_cfg_target_features: BTreeSet<String>

List of CPU target features enabled (avx, avx2, crt-static, rdrand, sse, sse2, sse4.1, ...)

out_dir: PathBuf

The folder in which all output should be placed

target: String

The target triple that is being compiled for (x86_64-pc-windows-msvc, ...)

host: String

The host triple of the rust compiler / build scripts (x86_64-pc-windows-msvc, ...)

num_jobs: String

The parallelism specified as the top-level parallelism.

opt_level: String

Values of the corresponding variables for the profile currently being built (DEBUG, ...)

profile: String

release for release builds, debug for debug builds, custom profiles may add more values

rustc: PathBuf

The compiler cargo has resolved to use

rustdoc: Option<PathBuf>

The documentation generator cargo has resolved to use

rustc_linker: Option<PathBuf>

The linker binary that Cargo has resolved to use for the current target, if specified

Implementations

impl Env[src]

pub fn get() -> Result<Self, Error>[src]

impl Env[src]

pub fn cargo_feature(&self, name: impl AsRef<str>) -> bool[src]

Is the given feature activated for the package being built?

pub fn cargo_cfg(&self, name: impl AsRef<str>) -> bool[src]

pub fn cargo_cfg_str(&self, name: impl AsRef<str>) -> Option<String>[src]

pub fn cargo_cfg_vec_str(&self, name: impl AsRef<str>) -> Vec<String>[src]

pub fn dep(&self, name: impl AsRef<str>, key: impl AsRef<str>) -> Option<String>[src]

Trait Implementations

impl Clone for Env[src]

impl Debug for Env[src]

Auto Trait Implementations

impl RefUnwindSafe for Env

impl Send for Env

impl Sync for Env

impl Unpin for Env

impl UnwindSafe for Env

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.