Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

*-apple-visionos

Apple visionOS / xrOS targets.

Tier: 2 (without Host Tools)

  • aarch64-apple-visionos: Apple visionOS on arm64.
  • aarch64-apple-visionos-sim: Apple visionOS Simulator on arm64.

Target maintainers

@agg23 @madsmtm

Requirements

These targets are cross-compiled, and require the corresponding visionOS SDK (XROS.sdk or XRSimulator.sdk), as provided by Xcode 15 or newer.

The path to the SDK can be passed to rustc using the common SDKROOT environment variable, or will be inferred when compiling on host macOS using roughly the same logic as xcrun --sdk xros --show-sdk-path.

OS version

The minimum supported version is visionOS 1.0.

This can be raised per-binary by changing the deployment target. rustc respects the common environment variables used by Xcode to do so, in this case XROS_DEPLOYMENT_TARGET.

Building the target

The targets are distributed through rustup, and can be installed using one of:

$ rustup target add aarch64-apple-visionos
$ rustup target add aarch64-apple-visionos-sim

Building Rust programs

See the instructions for iOS.

Testing

See the instructions for iOS.

Cross-compilation toolchains and C code

The Clang target is suffixed with -xros for historical reasons.

LLVM 18 or newer is required to build this target.