Expand description
Inputs from the build system to the build script.
This crate does not do any caching or interpreting of the values provided by Cargo beyond the communication protocol itself. It is up to the build script to interpret the string values and decide what to do with them.
Functions§
- cargo
- Path to the
cargo
binary performing the build. - cargo_
cfg - For each configuration option of the package being built, this will contain the value of the configuration.
- cargo_
cfg_ feature - Each activated feature of the package being built
- cargo_
cfg_ panic - The panic strategy.
- cargo_
cfg_ proc_ macro - If the crate is being compiled as a procedural macro.
- cargo_
cfg_ target_ abi - Disambiguation of the target ABI when the target env isn’t sufficient.
- cargo_
cfg_ target_ arch - The CPU target architecture. This is similar to the first element of the platform’s target triple, but not identical.
- cargo_
cfg_ target_ endian - The CPU target endianness.
- cargo_
cfg_ target_ env - The target environment ABI. This value is similar to the fourth element of the platform’s target triple.
- cargo_
cfg_ target_ feature - List of CPU target features enabled.
- cargo_
cfg_ target_ has_ atomic - List of CPU supported atomic widths.
- cargo_
cfg_ target_ os - The target operating system. This value is similar to the second and third element of the platform’s target triple.
- cargo_
cfg_ target_ pointer_ width - The CPU pointer width.
- cargo_
cfg_ target_ vendor - The target vendor.
- cargo_
cfg_ unix - Set on unix-like platforms.
- cargo_
cfg_ windows - Set on windows-like platforms.
- cargo_
encoded_ rustflags - Extra flags that Cargo invokes rustc with. See
build.rustflags
. - cargo_
feature - For each activated feature of the package being built, this will be
true
. - cargo_
makeflags - Contains parameters needed for Cargo’s jobserver implementation to parallelize subprocesses.
- cargo_
manifest_ dir - The directory containing the manifest for the package being built (the package containing the build script).
- cargo_
manifest_ links - The manifest
links
value. - cargo_
manifest_ path - The path to the manifest of your package.
- cargo_
pkg_ authors - The authors from the manifest of your package.
- cargo_
pkg_ description - The description from the manifest of your package.
- cargo_
pkg_ homepage - The home page from the manifest of your package.
- cargo_
pkg_ license - The license from the manifest of your package.
- cargo_
pkg_ license_ file - The license file from the manifest of your package.
- cargo_
pkg_ name - The name of your package.
- cargo_
pkg_ readme - Path to the README file of your package.
- cargo_
pkg_ repository - The repository from the manifest of your package.
- cargo_
pkg_ rust_ version - The Rust version from the manifest of your package. Note that this is the minimum Rust version supported by the package, not the current Rust version.
- cargo_
pkg_ version - The full version of your package.
- cargo_
pkg_ version_ major - The major version of your package.
- cargo_
pkg_ version_ minor - The minor version of your package.
- cargo_
pkg_ version_ patch - The patch version of your package.
- cargo_
pkg_ version_ pre - The pre-release version of your package.
- cargo_
target_ family - The target family.
- debug
- The amount of debug information included.
- dep_
metadata - Metadata set by dependencies. For more information, see build script
documentation about the
links
manifest key. - host
- The host triple of the Rust compiler.
- num_
jobs - The parallelism specified as the top-level parallelism.
- opt_
level - The level of optimization.
- out_dir
- The folder in which all output and intermediate artifacts should be placed.
- profile
release
for release builds,debug
for other builds.- rustc
- The compiler that Cargo has resolved to use.
- rustc_
linker - The linker that Cargo has resolved to use for the current target, if specified.
- rustc_
workspace_ wrapper - The rustc wrapper, if any, that Cargo is using for workspace members. See
build.rustc-workspace-wrapper
. - rustc_
wrapper - The rustc wrapper, if any, that Cargo is using. See
build.rustc-wrapper
. - rustdoc
- The documentation generator that Cargo has resolved to use.
- target
- The target triple that is being compiled for. Native code should be compiled for this triple.