13. Apple Silicon macOS

Warning

Experimental targets cannot be used in safety-critical contexts, and there is no guarantee that the Ferrocene test suite is successfully executed on the target. They are provided as a preview, with limited support available. They should not be used in production.

The aarch64-apple-darwin Ferrocene target provides support for macOS (Darwin) on Apple Silicon.

13.1. Prerequisites

This target uses the LLVM ld.lld linker. In order to locate the system C libraries required to link a functional macOS binary, this target drives the ld.lld linker using your system’s C compiler as a linker driver.

Install one of:

  • Xcode command line tools, or

  • Xcode

Note

If using Xcode, you will require an Apple Developer Program membership.

Xcode command line tools can be installed via xcode-select:

xcode-select --install

13.2. Archives to install

The following archives are needed when installing this target as a host platform:

  • rustc-aarch64-apple-darwin

  • rust-std-aarch64-apple-darwin

  • ferrocene-self-test-aarch64-apple-darwin

The following archives are needed when installing this target as a cross-compilation target:

  • rust-std-aarch64-apple-darwin

13.3. Required compiler flags

To use the target, the following additional flags must be provided to rustc:

  • --target aarch64-apple-darwin