Skip to content

Commit 73d968c

Browse files
authored
Rollup merge of rust-lang#85781 - badboy:document-aarch-ios-sim-support, r=Amanieu
Add documentation for aarch64-apple-ios-sim target Documentation as requested for [MCP 428](rust-lang/compiler-team#428) to promote this target to Tier 2. Currently it calls out that it's Tier 3. That should be changed if this target is promoted, but this PR could also land before that. Note: probably should get signoff from the compiler team based on that MCP.
2 parents 6e53131 + aa1b127 commit 73d968c

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

Diff for: src/doc/rustc/src/SUMMARY.md

+1
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)

Diff for: src/doc/rustc/src/platform-support.md

+1-1
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` | ? | |
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.

Diff for: src/tools/tier-check/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
let doc_targets_md = std::fs::read_to_string(&src).expect("failed to read input source");
2525
let doc_targets: HashSet<_> = doc_targets_md
2626
.lines()
27-
.filter(|line| line.starts_with('`') && line.contains('|'))
27+
.filter(|line| line.starts_with(&['`', '['][..]) && line.contains('|'))
2828
.map(|line| line.split('`').skip(1).next().expect("expected target code span"))
2929
.collect();
3030

0 commit comments

Comments
 (0)