*-apple-darwin
Apple macOS targets.
Tier: 1
x86_64-apple-darwin
: macOS on 64-bit x86.aarch64-apple-darwin
: macOS on ARM64 (M1-family or later Apple Silicon CPUs).The minimum supported version is macOS 10.12 Sierra on x86, and macOS 11.0 Big Sur on ARM64.
This version can be raised per-binary by changing the deployment target, which might yield more performance optimizations. rustc
respects the common environment variables used by Xcode to do so, in this case MACOSX_DEPLOYMENT_TARGET
.
The current default deployment target for rustc
can be retrieved with rustc --print=deployment-target
.
The default binary format is Mach-O, the executable format used on Apple's platforms.
These targets are distributed through rustup
, and otherwise require no special configuration.
There are no special requirements for testing and running this target.
x86 binaries can be run on Apple Silicon by using Rosetta.
Cross-compilation of these targets are supported using Clang, but may require Xcode or the macOS SDK (MacOSX.sdk
) to be available to compile C code and to link.
The path to the SDK can be passed to rustc
using the common SDKROOT
environment variable.