about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/rustc/src/platform-support.md2
-rw-r--r--src/doc/rustc/src/platform-support/aarch64-nintendo-switch.md49
2 files changed, 50 insertions, 1 deletions
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index 641fcb9d6f8..19f640f721b 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -209,7 +209,7 @@ target | std | host | notes
 `aarch64-apple-tvos` | * |  | ARM64 tvOS
 [`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-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-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
 `aarch64-unknown-hermit` | ✓ |  | ARM64 HermitCore
diff --git a/src/doc/rustc/src/platform-support/aarch64-nintendo-switch.md b/src/doc/rustc/src/platform-support/aarch64-nintendo-switch.md
new file mode 100644
index 00000000000..7eb3f21ea26
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/aarch64-nintendo-switch.md
@@ -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
+```