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