Function cross_compiling_from_cargo_env

Source
pub fn cross_compiling_from_cargo_env() -> Result<Option<CrossCompileConfig>>
Expand description

Detect whether we are cross compiling from Cargo and PYO3_CROSS_* environment variables and return an assembled CrossCompileConfig if so.

This must be called from PyO3’s build script, because it relies on environment variables such as CARGO_CFG_TARGET_OS which aren’t available at any other time.

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here