Skip to content

Commit

Permalink
Add platform markdown description
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 committed Feb 24, 2024
1 parent f56c6b5 commit be6ec40
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/doc/rustc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [aarch64-apple-ios-sim](platform-support/aarch64-apple-ios-sim.md)
- [\*-apple-tvos](platform-support/apple-tvos.md)
- [\*-apple-watchos\*](platform-support/apple-watchos.md)
- [aarch64-apple-xros\*](platform-support/apple-xros.md)
- [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md)
- [armeb-unknown-linux-gnueabi](platform-support/armeb-unknown-linux-gnueabi.md)
- [arm-none-eabi](platform-support/arm-none-eabi.md)
Expand Down
2 changes: 2 additions & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ target | std | host | notes
[`aarch64-apple-tvos-sim`](platform-support/apple-tvos.md) | ? | | ARM64 tvOS Simulator
[`aarch64-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS
[`aarch64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS Simulator
[`aarch64-apple-xros`](platform-support/apple-xros.md) | ✓ | | ARM64 Apple visionOS
[`aarch64-apple-xros-sim`](platform-support/apple-xros.md) | ✓ | | ARM64 Apple visionOS Simulator
[`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
[`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
Expand Down
52 changes: 52 additions & 0 deletions src/doc/rustc/src/platform-support/apple-xros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# aarch64-apple-xros\*

- aarch64-apple-xros
- aarch64-apple-xros-sim

**Tier: 3**

Apple visionOS targets:

- Apple visionOS on arm64
- Apple visionOS Simulator on arm64

## Target maintainers

- [@agg23](https://github.com/agg23)

## Requirements

These targets are cross-compiled.
To build these targets Xcode 15 or higher on macOS is required.

## Building the target

The targets can be built by enabling them for a `rustc` build, for example:

```toml
[build]
build-stage = 1
target = ["aarch64-apple-xros-sim"]
```

## Building Rust programs

_Note: Building for this target requires the corresponding visionOS SDK, as provided by Xcode 15+._

Rust programs can be built for these targets, if `rustc` has been built with support for them, for example:

```text
rustc --target aarch64-apple-xros-sim your-code.rs
```

## Testing

There is no support for running the Rust testsuite on visionOS or the simulators.

There is no easy way to run simple programs on visionOS or the visionOS simulators. Static library builds can be embedded into visionOS applications.

## Cross-compilation toolchains and C code

This target can be cross-compiled from x86_64 or aarch64 macOS hosts.

Other hosts are not supported for cross-compilation, but might work when also providing the required Xcode SDK.

0 comments on commit be6ec40

Please sign in to comment.