Skip to content

Commit 2f1372b

Browse files
committed
Add documentation for aarch64-apple-ios-sim target
1 parent e327a82 commit 2f1372b

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [JSON Output](json.md)
1414
- [Tests](tests/index.md)
1515
- [Platform Support](platform-support.md)
16+
- [aarch64-apple-ios-sim](platform-support/aarch64-apple-ios-sim.md)
1617
- [Target Tier Policy](target-tier-policy.md)
1718
- [Targets](targets/index.md)
1819
- [Built-in Targets](targets/built-in.md)

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ host tools.
196196
target | std | host | notes
197197
-------|-----|------|-------
198198
`aarch64-apple-ios-macabi` | ? | | Apple Catalyst on ARM64
199-
`aarch64-apple-ios-sim` | ? | | Apple iOS Simulator on ARM64
199+
[`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | | | Apple iOS Simulator on ARM64
200200
`aarch64-apple-tvos` | * | | ARM64 tvOS
201201
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
202202
`aarch64-unknown-hermit` | ? | |
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# aarch64-apple-ios-sim
2+
3+
**Tier: 3**
4+
5+
Apple iOS Simulator on ARM64.
6+
7+
## Designated Developers
8+
9+
* [@badboy](https://github.com/badboy)
10+
* [@deg4uss3r](https://github.com/deg4uss3r)
11+
12+
## Requirements
13+
14+
This target is cross-compiled.
15+
To build this target Xcode 12 or higher on macOS is required.
16+
17+
## Building
18+
19+
The target can be built by enabling it for a `rustc` build:
20+
21+
```toml
22+
[build]
23+
build-stage = 1
24+
target = ["aarch64-apple-ios-sim"]
25+
```
26+
27+
## Cross-compilation
28+
29+
This target can be cross-compiled from `x86_64` or `aarch64` macOS hosts.
30+
31+
Other hosts are not supported for cross-compilation, but might work when also providing the required Xcode SDK.
32+
33+
## Testing
34+
35+
Currently there is no support to run the rustc test suite for this target.
36+
37+
38+
## Building Rust programs
39+
40+
*Note: Building for this target requires the corresponding iOS SDK, as provided by Xcode 12+.*
41+
42+
If `rustc` has support for that target and the library artifacts are available,
43+
then Rust programs can be built for that target:
44+
45+
```text
46+
rustc --target aarch64-apple-ios-sim your-code.rs
47+
```
48+
49+
On Rust Nightly it is possible to build without the target artifacts available:
50+
51+
```text
52+
cargo build -Z build-std --target aarch64-apple-ios-sim
53+
```
54+
55+
There is no easy way to run simple programs in the iOS simulator.
56+
Static library builds can be embedded into iOS applications.

0 commit comments

Comments
 (0)