]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support.md
Merge commit '6f50986667debbfc67776304a8ee23fe0158613f' into libgccjit-codegen
[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 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 [`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ |  | Apple iOS Simulator on ARM64
169 `x86_64-fortanix-unknown-sgx` | ✓ | [Fortanix ABI] for 64-bit Intel SGX
170 `x86_64-fuchsia` | ✓ | 64-bit Fuchsia
171 `x86_64-linux-android` | ✓ | 64-bit x86 Android
172 `x86_64-pc-solaris` | ✓ | 64-bit Solaris 10/11, illumos
173 `x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
174 `x86_64-unknown-redox` | ✓ | Redox OS
175
176 [Fortanix ABI]: https://edp.fortanix.com/
177
178 ## Tier 3
179
180 Tier 3 targets are those which the Rust codebase has support for, but which the
181 Rust project does not build or test automatically, so they may or may not work.
182 Official builds are not available. For the full requirements, see [Tier 3
183 target policy](target-tier-policy.md#tier-3-target-policy) in the Target Tier
184 Policy.
185
186 The `std` column in the table below has the following meanings:
187
188 * ✓ indicates the full standard library is available.
189 * \* indicates the target only supports [`no_std`] development.
190 * ? indicates the standard library support is unknown or a work-in-progress.
191
192 [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html
193
194 The `host` column indicates whether the codebase includes support for building
195 host tools.
196
197 target | std | host | notes
198 -------|:---:|:----:|-------
199 `aarch64-apple-ios-macabi` | ? |  | Apple Catalyst on ARM64
200 `aarch64-apple-tvos` | * |  | ARM64 tvOS
201 `aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
202 `aarch64-unknown-hermit` | ? |  |
203 `aarch64-unknown-uefi` | * |  | ARM64 UEFI
204 `aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
205 `aarch64-unknown-netbsd` | ✓ | ✓ |
206 `aarch64-unknown-openbsd` | ✓ | ✓ | ARM64 OpenBSD
207 `aarch64-unknown-redox` | ? |  | ARM64 Redox OS
208 `aarch64-uwp-windows-msvc` | ? |  |
209 `aarch64-wrs-vxworks` | ? |  |
210 `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI)
211 `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian)
212 `armv4t-unknown-linux-gnueabi` | ? |  |
213 `armv5te-unknown-linux-uclibceabi` | ? |  | ARMv5TE Linux with uClibc
214 `armv6-unknown-freebsd` | ✓ | ✓ | ARMv6 FreeBSD
215 `armv6-unknown-netbsd-eabihf` | ? |  |
216 `armv7-apple-ios` | ✓ |  | ARMv7 iOS, Cortex-a8
217 `armv7-unknown-freebsd` | ✓ | ✓ | ARMv7 FreeBSD
218 `armv7-unknown-netbsd-eabihf` | ✓ | ✓ |
219 `armv7-wrs-vxworks-eabihf` | ? |  |
220 `armv7a-none-eabihf` | * | | ARM Cortex-A, hardfloat
221 `armv7s-apple-ios` | ✓ |  |
222 `avr-unknown-gnu-atmega328` | * |  | AVR. Requires `-Z build-std=core`
223 `bpfeb-unknown-none` | * |  | BPF (big endian)
224 `bpfel-unknown-none` | * |  | BPF (little endian)
225 `hexagon-unknown-linux-musl` | ? |  |
226 `i386-apple-ios` | ✓ |  | 32-bit x86 iOS
227 `i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+)
228 `i686-pc-windows-msvc` | ✓ |  | 32-bit Windows XP support
229 `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
230 `i686-unknown-netbsd` | ✓ | ✓ | NetBSD/i386 with SSE2
231 `i686-unknown-openbsd` | ✓ | ✓ | 32-bit OpenBSD
232 `i686-unknown-uefi` | * |  | 32-bit UEFI
233 `i686-uwp-windows-gnu` | ? |  |
234 `i686-uwp-windows-msvc` | ? |  |
235 `i686-wrs-vxworks` | ? |  |
236 `mips-unknown-linux-uclibc` | ✓ |  | MIPS Linux with uClibc
237 `mipsel-sony-psp` | * |  | MIPS (LE) Sony PlayStation Portable (PSP)
238 `mipsel-unknown-linux-uclibc` | ✓ |  | MIPS (LE) Linux with uClibc
239 `mipsel-unknown-none` | * |  | Bare MIPS (LE) softfloat
240 `mipsisa32r6-unknown-linux-gnu` | ? |  |
241 `mipsisa32r6el-unknown-linux-gnu` | ? |  |
242 `mipsisa64r6-unknown-linux-gnuabi64` | ? |  |
243 `mipsisa64r6el-unknown-linux-gnuabi64` | ? |  |
244 `msp430-none-elf` | * |  | 16-bit MSP430 microcontrollers
245 `powerpc-unknown-linux-gnuspe` | ✓ |  | PowerPC SPE Linux
246 `powerpc-unknown-linux-musl` | ? |  |
247 `powerpc-unknown-netbsd` | ✓ | ✓ |
248 `powerpc-unknown-openbsd` | ? |  |
249 `powerpc-wrs-vxworks-spe` | ? |  |
250 `powerpc-wrs-vxworks` | ? |  |
251 `powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
252 `powerpc64le-unknown-freebsd` |   |   | PPC64LE FreeBSD
253 `powerpc-unknown-freebsd` |   |   | PowerPC FreeBSD
254 `powerpc64-unknown-linux-musl` | ? |  |
255 `powerpc64-wrs-vxworks` | ? |  |
256 `powerpc64le-unknown-linux-musl` | ? |  |
257 `riscv32gc-unknown-linux-gnu` |   |   | RISC-V Linux (kernel 5.4, glibc 2.33)
258 `riscv32gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches)
259 `riscv64gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 4.20, musl 1.2.0)
260 `s390x-unknown-linux-musl` |  |  | S390x Linux (kernel 2.6.32, MUSL)
261 `sparc-unknown-linux-gnu` | ✓ |  | 32-bit SPARC Linux
262 `sparc64-unknown-netbsd` | ✓ | ✓ | NetBSD/sparc64
263 `sparc64-unknown-openbsd` | ? |  |
264 `thumbv4t-none-eabi` | * |  | ARMv4T T32
265 `thumbv7a-pc-windows-msvc` | ? |  |
266 `thumbv7a-uwp-windows-msvc` | ✓ |  |
267 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7a Linux with NEON, MUSL
268 `wasm64-unknown-unknown` | * |  | WebAssembly
269 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
270 `x86_64-apple-tvos` | * | | x86 64-bit tvOS
271 `x86_64-pc-windows-msvc` | ✓ |  | 64-bit Windows XP support
272 `x86_64-sun-solaris` | ? |  | Deprecated target for 64-bit Solaris 10/11, illumos
273 `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
274 `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
275 `x86_64-unknown-hermit` | ? |  |
276 `x86_64-unknown-l4re-uclibc` | ? |  |
277 `x86_64-unknown-none-hermitkernel` | ? |  | HermitCore kernel
278 `x86_64-unknown-none-linuxkernel` | * |  | Linux kernel modules
279 `x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD
280 `x86_64-unknown-uefi` | * |  | 64-bit UEFI
281 `x86_64-uwp-windows-gnu` | ✓ |  |
282 `x86_64-uwp-windows-msvc` | ✓ |  |
283 `x86_64-wrs-vxworks` | ? |  |
284
285 [runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets