]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support/apple-watchos.md
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / src / doc / rustc / src / platform-support / apple-watchos.md
1 # *-apple-watchos
2 - arm64_32-apple-watchos
3 - armv7k-apple-watchos
4 - aarch64-apple-watchos-sim
5 - x86_64-apple-watchos-sim
6
7 **Tier: 3**
8
9 Apple WatchOS targets:
10 - Apple WatchOS on Arm 64_32
11 - Apple WatchOS on Arm v7k
12 - Apple WatchOS Simulator on arm64
13 - Apple WatchOS Simulator on x86_64
14
15 ## Target maintainers
16
17 * [@deg4uss3r](https://github.com/deg4uss3r)
18 * [@vladimir-ea](https://github.com/vladimir-ea)
19
20 ## Requirements
21
22 These targets are cross-compiled.
23 To build these targets Xcode 12 or higher on macOS is required.
24
25 ## Building the target
26
27 The targets can be built by enabling them for a `rustc` build, for example:
28
29 ```toml
30 [build]
31 build-stage = 1
32 target = ["aarch64-apple-watchos-sim"]
33 ```
34
35 ## Building Rust programs
36
37 *Note: Building for this target requires the corresponding WatchOS SDK, as provided by Xcode 12+.*
38
39 Rust programs can be built for these targets, if `rustc` has been built with support for them, for example:
40
41 ```text
42 rustc --target aarch64-apple-watchos-sim your-code.rs
43 ```
44
45 ## Testing
46
47 There is no support for running the Rust testsuite on WatchOS or the simulators.
48
49 There is no easy way to run simple programs on WatchOS or the WatchOS simulators. Static library builds can be embedded into WatchOS applications.
50
51 ## Cross-compilation toolchains and C code
52
53 This target can be cross-compiled from x86_64 or aarch64 macOS hosts.
54
55 Other hosts are not supported for cross-compilation, but might work when also providing the required Xcode SDK.