Crate build_context

Source
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