]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support/aarch64-nintendo-switch-freestanding.md
Rollup merge of #105419 - YC:issue-41731, r=petrochenkov
[rust.git] / src / doc / rustc / src / platform-support / aarch64-nintendo-switch-freestanding.md
1 # aarch64-nintendo-switch-freestanding
2
3 **Tier: 3**
4
5 Nintendo Switch with pure-Rust toolchain.
6
7 ## Designated Developers
8
9 * [@leo60228](https://github.com/leo60228)
10 * [@jam1garner](https://github.com/jam1garner)
11
12 ## Requirements
13
14 This target is cross-compiled.
15 It has no special requirements for the host.
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-nintendo-switch-freestanding"]
25 ```
26
27 ## Cross-compilation
28
29 This target can be cross-compiled from any host.
30
31 ## Testing
32
33 Currently there is no support to run the rustc test suite for this target.
34
35 ## Building Rust programs
36
37 If `rustc` has support for that target and the library artifacts are available,
38 then Rust programs can be built for that target:
39
40 ```text
41 rustc --target aarch64-nintendo-switch-freestanding your-code.rs
42 ```
43
44 To generate binaries in the NRO format that can be easily run on-device, you
45 can use [cargo-nx](https://github.com/aarch64-switch-rs/cargo-nx):
46
47 ```text
48 cargo nx --triple=aarch64-nintendo-switch-freestanding
49 ```