]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support.md
Update note about tier 2 docs.
[rust.git] / src / doc / rustc / src / platform-support.md
1 # Platform Support
2
3 <style type="text/css">
4     td code {
5         white-space: nowrap;
6     }
7 </style>
8
9 Support for different platforms ("targets") are organized into three tiers,
10 each with a different set of guarantees. For more information on the policies
11 for targets at each tier, see the [Target Tier Policy](target-tier-policy.md).
12
13 Targets are identified by their "target triple" which is the string to inform
14 the compiler what kind of output should be produced.
15
16 ## Tier 1 with Host Tools
17
18 Tier 1 targets can be thought of as "guaranteed to work". The Rust project
19 builds official binary releases for each tier 1 target, and automated testing
20 ensures that each tier 1 target builds and passes tests after each change.
21
22 Tier 1 targets with host tools additionally support running tools like `rustc`
23 and `cargo` natively on the target, and automated testing ensures that tests
24 pass for the host tools as well. This allows the target to be used as a
25 development platform, not just a compilation target. For the full requirements,
26 see [Tier 1 with Host Tools](target-tier-policy.md#tier-1-with-host-tools) in
27 the Target Tier Policy.
28
29 All tier 1 targets with host tools support the full standard library.
30
31 target | notes
32 -------|-------
33 `aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.2, glibc 2.17+) [^missing-stack-probes]
34 `i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+)
35 `i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+)
36 `i686-unknown-linux-gnu` | 32-bit Linux (kernel 2.6.32+, glibc 2.11+)
37 `x86_64-apple-darwin` | 64-bit macOS (10.7+, Lion+)
38 `x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+)
39 `x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+)
40 `x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 2.6.32+, glibc 2.11+)
41
42 [^missing-stack-probes]: Stack probes support is missing on
43   `aarch64-unknown-linux-gnu`, but it's planned to be implemented in the near
44   future. The implementation is tracked on [issue #77071][77071].
45
46 [77071]: https://github.com/rust-lang/rust/issues/77071
47
48 ## Tier 1
49
50 Tier 1 targets can be thought of as "guaranteed to work". The Rust project
51 builds official binary releases for each tier 1 target, and automated testing
52 ensures that each tier 1 target builds and passes tests after each change. For
53 the full requirements, see [Tier 1 target
54 policy](target-tier-policy.md#tier-1-target-policy) in the Target Tier Policy.
55
56 At this time, all Tier 1 targets are [Tier 1 with Host
57 Tools](#tier-1-with-host-tools).
58
59 ## Tier 2 with Host Tools
60
61 Tier 2 targets can be thought of as "guaranteed to build". The Rust project
62 builds official binary releases for each tier 2 target, and automated builds
63 ensure that each tier 2 target builds after each change. Automated tests are
64 not always run so it's not guaranteed to produce a working build, but tier 2
65 targets often work to quite a good degree and patches are always welcome!
66
67 Tier 2 targets with host tools additionally support running tools like `rustc`
68 and `cargo` natively on the target, and automated builds ensure that the host
69 tools build as well. This allows the target to be used as a development
70 platform, not just a compilation target. For the full requirements, see [Tier 2
71 with Host Tools](target-tier-policy.md#tier-2-with-host-tools) in the Target
72 Tier Policy.
73
74 All tier 2 targets with host tools support the full standard library.
75
76 **NOTE:** The `rust-docs` component is not usually built for tier 2 targets,
77 so Rustup may install the documentation for a similar tier 1 target instead.
78
79 target | notes
80 -------|-------
81 `aarch64-apple-darwin` | ARM64 macOS (11.0+, Big Sur+)
82 `aarch64-pc-windows-msvc` | ARM64 Windows MSVC
83 `aarch64-unknown-linux-musl` | ARM64 Linux with MUSL
84 `arm-unknown-linux-gnueabi` | ARMv6 Linux (kernel 3.2, glibc 2.17)
85 `arm-unknown-linux-gnueabihf` | ARMv6 Linux, hardfloat (kernel 3.2, glibc 2.17)
86 `armv7-unknown-linux-gnueabihf` | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
87 `mips-unknown-linux-gnu` | MIPS Linux (kernel 4.4, glibc 2.23)
88 `mips64-unknown-linux-gnuabi64` | MIPS64 Linux, n64 ABI (kernel 4.4, glibc 2.23)
89 `mips64el-unknown-linux-gnuabi64` | MIPS64 (LE) Linux, n64 ABI (kernel 4.4, glibc 2.23)
90 `mipsel-unknown-linux-gnu` | MIPS (LE) Linux (kernel 4.4, glibc 2.23)
91 `powerpc-unknown-linux-gnu` | PowerPC Linux (kernel 2.6.32, glibc 2.11)
92 `powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 2.6.32, glibc 2.11)
93 `powerpc64le-unknown-linux-gnu` | PPC64LE Linux (kernel 3.10, glibc 2.17)
94 `riscv64gc-unknown-linux-gnu` | RISC-V Linux (kernel 4.20, glibc 2.29)
95 `s390x-unknown-linux-gnu` | S390x Linux (kernel 2.6.32, glibc 2.12)
96 `x86_64-unknown-freebsd` | 64-bit FreeBSD
97 `x86_64-unknown-illumos` | illumos
98 `x86_64-unknown-linux-musl` | 64-bit Linux with MUSL
99 `x86_64-unknown-netbsd` | NetBSD/amd64
100
101 ## Tier 2
102
103 Tier 2 targets can be thought of as "guaranteed to build". The Rust project
104 builds official binary releases for each tier 2 target, and automated builds
105 ensure that each tier 2 target builds after each change. Automated tests are
106 not always run so it's not guaranteed to produce a working build, but tier 2
107 targets often work to quite a good degree and patches are always welcome! For
108 the full requirements, see [Tier 2 target
109 policy](target-tier-policy.md#tier-2-target-policy) in the Target Tier Policy.
110
111 The `std` column in the table below has the following meanings:
112
113 * ✓ indicates the full standard library is available.
114 * \* indicates the target only supports [`no_std`] development.
115
116 [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html
117
118 **NOTE:** The `rust-docs` component is not usually built for tier 2 targets,
119 so Rustup may install the documentation for a similar tier 1 target instead.
120
121 target | std | notes
122 -------|:---:|-------
123 `aarch64-apple-ios` | ✓ | ARM64 iOS
124 [`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ | Apple iOS Simulator on ARM64
125 `aarch64-fuchsia` | ✓ | ARM64 Fuchsia
126 `aarch64-linux-android` | ✓ | ARM64 Android
127 `aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat
128 `aarch64-unknown-none` | * | Bare ARM64, hardfloat
129 `arm-linux-androideabi` | ✓ | ARMv7 Android
130 `arm-unknown-linux-musleabi` | ✓ | ARMv6 Linux with MUSL
131 `arm-unknown-linux-musleabihf` | ✓ | ARMv6 Linux with MUSL, hardfloat
132 `armebv7r-none-eabi` | * | Bare ARMv7-R, Big Endian
133 `armebv7r-none-eabihf` | * | Bare ARMv7-R, Big Endian, hardfloat
134 `armv5te-unknown-linux-gnueabi` | ✓ | ARMv5TE Linux (kernel 4.4, glibc 2.23)
135 `armv5te-unknown-linux-musleabi` | ✓ | ARMv5TE Linux with MUSL
136 `armv7-linux-androideabi` | ✓ | ARMv7a Android
137 `armv7-unknown-linux-gnueabi` | ✓ |ARMv7 Linux (kernel 4.15, glibc 2.27)
138 `armv7-unknown-linux-musleabi` | ✓ |ARMv7 Linux with MUSL
139 `armv7-unknown-linux-musleabihf` | ✓ | ARMv7 Linux with MUSL, hardfloat
140 `armv7a-none-eabi` | * | Bare ARMv7-A
141 `armv7r-none-eabi` | * | Bare ARMv7-R
142 `armv7r-none-eabihf` | * | Bare ARMv7-R, hardfloat
143 `asmjs-unknown-emscripten` | ✓ | asm.js via Emscripten
144 `i586-pc-windows-msvc` | * | 32-bit Windows w/o SSE
145 `i586-unknown-linux-gnu` | ✓ | 32-bit Linux w/o SSE (kernel 4.4, glibc 2.23)
146 `i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, MUSL
147 `i686-linux-android` | ✓ | 32-bit x86 Android
148 `i686-unknown-freebsd` | ✓ | 32-bit FreeBSD
149 `i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL
150 `mips-unknown-linux-musl` | ✓ | MIPS Linux with MUSL
151 `mips64-unknown-linux-muslabi64` | ✓ | MIPS64 Linux, n64 ABI, MUSL
152 `mips64el-unknown-linux-muslabi64` | ✓ | MIPS64 (LE) Linux, n64 ABI, MUSL
153 `mipsel-unknown-linux-musl` | ✓ | MIPS (LE) Linux with MUSL
154 `nvptx64-nvidia-cuda` | * | --emit=asm generates PTX code that [runs on NVIDIA GPUs]
155 `riscv32i-unknown-none-elf` | * | Bare RISC-V (RV32I ISA)
156 `riscv32imac-unknown-none-elf` | * | Bare RISC-V (RV32IMAC ISA)
157 `riscv32imc-unknown-none-elf` | * | Bare RISC-V (RV32IMC ISA)
158 `riscv64gc-unknown-none-elf` | * | Bare RISC-V (RV64IMAFDC ISA)
159 `riscv64imac-unknown-none-elf` | * | Bare RISC-V (RV64IMAC ISA)
160 `sparc64-unknown-linux-gnu` | ✓ | SPARC Linux (kernel 4.4, glibc 2.23)
161 `sparcv9-sun-solaris` | ✓ | SPARC Solaris 10/11, illumos
162 `thumbv6m-none-eabi` | * | Bare Cortex-M0, M0+, M1
163 `thumbv7em-none-eabi` | * | Bare Cortex-M4, M7
164 `thumbv7em-none-eabihf` | * | Bare Cortex-M4F, M7F, FPU, hardfloat
165 `thumbv7m-none-eabi` | * | Bare Cortex-M3
166 `thumbv7neon-linux-androideabi` | ✓ | Thumb2-mode ARMv7a Android with NEON
167 `thumbv7neon-unknown-linux-gnueabihf` | ✓ | Thumb2-mode ARMv7a Linux with NEON (kernel 4.4, glibc 2.23)
168 `thumbv8m.base-none-eabi` | * | ARMv8-M Baseline
169 `thumbv8m.main-none-eabi` | * | ARMv8-M Mainline
170 `thumbv8m.main-none-eabihf` | * | ARMv8-M Mainline, hardfloat
171 `wasm32-unknown-emscripten` | ✓ | WebAssembly via Emscripten
172 `wasm32-unknown-unknown` | ✓ | WebAssembly
173 `wasm32-wasi` | ✓ | WebAssembly with WASI
174 `x86_64-apple-ios` | ✓ | 64-bit x86 iOS
175 `x86_64-fortanix-unknown-sgx` | ✓ | [Fortanix ABI] for 64-bit Intel SGX
176 `x86_64-fuchsia` | ✓ | 64-bit Fuchsia
177 `x86_64-linux-android` | ✓ | 64-bit x86 Android
178 `x86_64-pc-solaris` | ✓ | 64-bit Solaris 10/11, illumos
179 `x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
180 `x86_64-unknown-redox` | ✓ | Redox OS
181
182 [Fortanix ABI]: https://edp.fortanix.com/
183
184 ## Tier 3
185
186 Tier 3 targets are those which the Rust codebase has support for, but which the
187 Rust project does not build or test automatically, so they may or may not work.
188 Official builds are not available. For the full requirements, see [Tier 3
189 target policy](target-tier-policy.md#tier-3-target-policy) in the Target Tier
190 Policy.
191
192 The `std` column in the table below has the following meanings:
193
194 * ✓ indicates the full standard library is available.
195 * \* indicates the target only supports [`no_std`] development.
196 * ? indicates the standard library support is unknown or a work-in-progress.
197
198 [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html
199
200 The `host` column indicates whether the codebase includes support for building
201 host tools.
202
203 target | std | host | notes
204 -------|:---:|:----:|-------
205 `aarch64-apple-ios-macabi` | ? |  | Apple Catalyst on ARM64
206 `aarch64-apple-tvos` | * |  | ARM64 tvOS
207 [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ |  | ARM64 SOLID with TOPPERS/ASP3
208 `aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
209 `aarch64-unknown-hermit` | ✓ |  | ARM64 HermitCore
210 [`aarch64-unknown-none-hermitkernel`](platform-support/aarch64-unknown-none-hermitkernel.md) | * |  | ARM64 HermitCore kernel
211 `aarch64-unknown-uefi` | * |  | ARM64 UEFI
212 `aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
213 `aarch64-unknown-netbsd` | ✓ | ✓ |
214 [`aarch64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | ARM64 OpenBSD
215 `aarch64-unknown-redox` | ? |  | ARM64 Redox OS
216 `aarch64-uwp-windows-msvc` | ? |  |
217 `aarch64-wrs-vxworks` | ? |  |
218 `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI)
219 `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian)
220 `armv4t-unknown-linux-gnueabi` | ? |  |
221 `armv5te-unknown-linux-uclibceabi` | ? |  | ARMv5TE Linux with uClibc
222 `armv6-unknown-freebsd` | ✓ | ✓ | ARMv6 FreeBSD
223 `armv6-unknown-netbsd-eabihf` | ? |  |
224 `armv6k-nintendo-3ds` | * |  | ARMv6K Nintendo 3DS, Horizon (Requires devkitARM toolchain)
225 `armv7-apple-ios` | ✓ |  | ARMv7 iOS, Cortex-a8
226 [`armv7-unknown-linux-uclibceabi`](platform-support/armv7-unknown-linux-uclibceabi.md) | ✓ | ✓ | ARMv7 Linux with uClibc, softfloat
227 [`armv7-unknown-linux-uclibceabihf`](platform-support/armv7-unknown-linux-uclibceabihf.md) | ✓ | ? | ARMv7 Linux with uClibc, hardfloat
228 `armv7-unknown-freebsd` | ✓ | ✓ | ARMv7 FreeBSD
229 `armv7-unknown-netbsd-eabihf` | ✓ | ✓ |
230 `armv7-wrs-vxworks-eabihf` | ? |  |
231 [`armv7a-kmc-solid_asp3-eabi`](platform-support/kmc-solid.md) | ✓ |  | ARM SOLID with TOPPERS/ASP3
232 [`armv7a-kmc-solid_asp3-eabihf`](platform-support/kmc-solid.md) | ✓ |  | ARM SOLID with TOPPERS/ASP3, hardfloat
233 `armv7a-none-eabihf` | * | | ARM Cortex-A, hardfloat
234 `armv7s-apple-ios` | ✓ |  |
235 `avr-unknown-gnu-atmega328` | * |  | AVR. Requires `-Z build-std=core`
236 `bpfeb-unknown-none` | * |  | BPF (big endian)
237 `bpfel-unknown-none` | * |  | BPF (little endian)
238 `hexagon-unknown-linux-musl` | ? |  |
239 `i386-apple-ios` | ✓ |  | 32-bit x86 iOS
240 `i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+)
241 `i686-pc-windows-msvc` | * |  | 32-bit Windows XP support
242 `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
243 `i686-unknown-netbsd` | ✓ | ✓ | NetBSD/i386 with SSE2
244 [`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD
245 `i686-unknown-uefi` | * |  | 32-bit UEFI
246 `i686-uwp-windows-gnu` | ? |  |
247 `i686-uwp-windows-msvc` | ? |  |
248 `i686-wrs-vxworks` | ? |  |
249 `m68k-unknown-linux-gnu` | ? |  | Motorola 680x0 Linux
250 `mips-unknown-linux-uclibc` | ✓ |  | MIPS Linux with uClibc
251 `mips64-openwrt-linux-musl` | ? |  | MIPS64 for OpenWrt Linux MUSL
252 `mipsel-sony-psp` | * |  | MIPS (LE) Sony PlayStation Portable (PSP)
253 `mipsel-unknown-linux-uclibc` | ✓ |  | MIPS (LE) Linux with uClibc
254 `mipsel-unknown-none` | * |  | Bare MIPS (LE) softfloat
255 `mipsisa32r6-unknown-linux-gnu` | ? |  |
256 `mipsisa32r6el-unknown-linux-gnu` | ? |  |
257 `mipsisa64r6-unknown-linux-gnuabi64` | ? |  |
258 `mipsisa64r6el-unknown-linux-gnuabi64` | ? |  |
259 `msp430-none-elf` | * |  | 16-bit MSP430 microcontrollers
260 `powerpc-unknown-linux-gnuspe` | ✓ |  | PowerPC SPE Linux
261 `powerpc-unknown-linux-musl` | ? |  |
262 `powerpc-unknown-netbsd` | ✓ | ✓ |
263 `powerpc-unknown-openbsd` | ? |  |
264 `powerpc-wrs-vxworks-spe` | ? |  |
265 `powerpc-wrs-vxworks` | ? |  |
266 `powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
267 `powerpc64le-unknown-freebsd` |   |   | PPC64LE FreeBSD
268 `powerpc-unknown-freebsd` |   |   | PowerPC FreeBSD
269 `powerpc64-unknown-linux-musl` | ? |  |
270 `powerpc64-wrs-vxworks` | ? |  |
271 `powerpc64le-unknown-linux-musl` | ? |  |
272 `riscv32gc-unknown-linux-gnu` |   |   | RISC-V Linux (kernel 5.4, glibc 2.33)
273 `riscv32gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches)
274 `riscv32imc-esp-espidf` | ✓ |  | RISC-V ESP-IDF
275 `riscv64gc-unknown-freebsd` |   |   | RISC-V FreeBSD
276 `riscv64gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 4.20, musl 1.2.0)
277 `s390x-unknown-linux-musl` |  |  | S390x Linux (kernel 2.6.32, MUSL)
278 `sparc-unknown-linux-gnu` | ✓ |  | 32-bit SPARC Linux
279 `sparc64-unknown-netbsd` | ✓ | ✓ | NetBSD/sparc64
280 [`sparc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/sparc64
281 `thumbv4t-none-eabi` | * |  | ARMv4T T32
282 `thumbv7a-pc-windows-msvc` | ? |  |
283 `thumbv7a-uwp-windows-msvc` | ✓ |  |
284 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7a Linux with NEON, MUSL
285 [`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? |  | WebAssembly
286 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
287 `x86_64-apple-tvos` | * | | x86 64-bit tvOS
288 `x86_64-pc-windows-msvc` | * |  | 64-bit Windows XP support
289 `x86_64-sun-solaris` | ? |  | Deprecated target for 64-bit Solaris 10/11, illumos
290 `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
291 `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
292 `x86_64-unknown-hermit` | ✓ |  | HermitCore
293 `x86_64-unknown-l4re-uclibc` | ? |  |
294 [`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * |  | Freestanding/bare-metal x86_64, softfloat
295 `x86_64-unknown-none-hermitkernel` | * |  | HermitCore kernel
296 `x86_64-unknown-none-linuxkernel` | * |  | Linux kernel modules
297 [`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
298 `x86_64-unknown-uefi` | * |  | 64-bit UEFI
299 `x86_64-uwp-windows-gnu` | ✓ |  |
300 `x86_64-uwp-windows-msvc` | ✓ |  |
301 `x86_64-wrs-vxworks` | ? |  |
302
303 [runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets