Expand description
Make build environment/target information available as constants in normal libraries and binaries.
This is intended primarily for use in tests and its helpers. When used in libraries or binaries, be careful not to depend on constants that depend on the host environment.
Some constants duplicate those provided in std::env::consts
.
Constantsยง
- CARGO
CARGO
- HOST
HOST
- PANIC
CARGO_CFG_PANIC
- RUSTC
RUSTC
- RUSTDOC
RUSTDOC
- SANITIZE
CARGO_CFG_SANITIZE
- TARGET
TARGET
- TARGET_
ABI CARGO_CFG_TARGET_ABI
- TARGET_
ARCH CARGO_CFG_TARGET_ARCH
- TARGET_
ENDIAN CARGO_CFG_TARGET_ENDIAN
- TARGET_
ENV CARGO_CFG_TARGET_ENV
- TARGET_
FAMILY CARGO_CFG_TARGET_FAMILY
- TARGET_
FEATURE CARGO_CFG_TARGET_FEATURE
- TARGET_
HAS_ ATOMIC CARGO_CFG_TARGET_HAS_ATOMIC
- TARGET_
OS CARGO_CFG_TARGET_OS
- TARGET_
POINTER_ WIDTH CARGO_CFG_TARGET_POINTER_WIDTH
- TARGET_
VENDOR CARGO_CFG_TARGET_VENDOR