Add docs for Switch target

This commit is contained in:
leo60228 2021-09-17 10:11:19 -04:00
parent c690db4024
commit fd81b99a99
No known key found for this signature in database
GPG key ID: AC6F4BA078E67833
2 changed files with 50 additions and 1 deletions

View file

@ -209,7 +209,7 @@ target | std | host | notes
`aarch64-apple-tvos` | * | | ARM64 tvOS `aarch64-apple-tvos` | * | | ARM64 tvOS
[`aarch64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS Simulator [`aarch64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS Simulator
[`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3 [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3
`aarch64-nintendo-switch` | * | | ARM64 Nintendo Switch, Horizon [`aarch64-nintendo-switch`](platform-support/aarch64-nintendo-switch.md) | * | | ARM64 Nintendo Switch, Horizon
[`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD `aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
`aarch64-unknown-hermit` | ✓ | | ARM64 HermitCore `aarch64-unknown-hermit` | ✓ | | ARM64 HermitCore

View file

@ -0,0 +1,49 @@
# aarch64-nintendo-switch
**Tier: 3**
Nintendo Switch with pure-Rust toolchain.
## Designated Developers
* [@leo60228](https://github.com/leo60228)
* [@jam1garner](https://github.com/jam1garner)
## Requirements
This target is cross-compiled.
It has no special requirements for the host.
## Building
The target can be built by enabling it for a `rustc` build:
```toml
[build]
build-stage = 1
target = ["aarch64-nintendo-switch"]
```
## Cross-compilation
This target can be cross-compiled from any host.
## Testing
Currently there is no support to run the rustc test suite for this target.
## Building Rust programs
If `rustc` has support for that target and the library artifacts are available,
then Rust programs can be built for that target:
```text
rustc --target aarch64-nintendo-switch your-code.rs
```
To generate binaries in the NRO format that can be easily run on-device, you
can use [cargo-nx](https://github.com/aarch64-switch-rs/cargo-nx):
```text
cargo nx --triple=aarch64-nintendo-switch
```