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