*-apple-tvos

Apple tvOS targets.

Tier: 3

Target maintainers

@thomcc @madsmtm

Requirements

These targets are cross-compiled, and require the corresponding tvOS SDK (AppleTVOS.sdk or AppleTVSimulator.sdk), as provided by Xcode. To build the ARM64 targets, Xcode 12 or higher is required.

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 appletvos --show-sdk-path.

OS version

The minimum supported version is tvOS 10.0, although the actual minimum version you can target may be newer than this, for example due to the versions of Xcode and your SDKs.

The version 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 TVOS_DEPLOYMENT_TARGET.

Incompletely supported library functionality

The targets support most of the standard library including the allocator to the best of my knowledge, however they are very new, not yet well-tested, and it is possible that there are various bugs.

The following APIs are currently known to have missing or incomplete support:

Building the target

The targets can be built by enabling them for a rustc build in bootstrap.toml, by adding, for example:

[build]
build-stage = 1
target = ["aarch64-apple-tvos", "aarch64-apple-tvos-sim"]

Using the unstable -Zbuild-std with a nightly Cargo may also work.

Building Rust programs

See the instructions for iOS.

Testing

See the instructions for iOS.