pub struct Env {
Show 22 fields 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>,
}
Expand description

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

Is the given feature activated for the package being built?

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.