]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support.md
Auto merge of #82448 - Aaron1011:merge-hastokens-hasattrs, r=petrochenkov
[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 are organized into three tiers, each with a
10 different set of guarantees.
11
12 Platforms are identified by their "target triple" which is the string to
13 inform the compiler what kind of output should be produced. The columns in the
14 tables below have the following meanings:
15
16 * std:
17     * ✓ indicates the full standard library is available.
18     * \* indicates the target only supports [`no_std`] development.
19     * ? indicates the standard library support is unknown or a work-in-progress.
20 * host: A ✓ indicates that `rustc` and `cargo` can run on the host platform.
21
22 [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html
23
24 ## Tier 1
25
26 Tier 1 platforms can be thought of as "guaranteed to work".
27 Specifically they will each satisfy the following requirements:
28
29 * Official binary releases are provided for the platform.
30 * Automated testing is set up to run tests for the platform.
31 * Landing changes to the `rust-lang/rust` repository's master branch is gated
32   on tests passing.
33 * Documentation for how to use and how to build the platform is available.
34
35 target | std | host | notes
36 -------|-----|------|-------
37 `aarch64-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (kernel 4.2, glibc 2.17+) [^missing-stack-probes]
38 `i686-pc-windows-gnu` | ✓ | ✓ | 32-bit MinGW (Windows 7+)
39 `i686-pc-windows-msvc` | ✓ | ✓ | 32-bit MSVC (Windows 7+)
40 `i686-unknown-linux-gnu` | ✓ | ✓ | 32-bit Linux (kernel 2.6.32+, glibc 2.11+)
41 `x86_64-apple-darwin` | ✓ | ✓ | 64-bit macOS (10.7+, Lion+)
42 `x86_64-pc-windows-gnu` | ✓ | ✓ | 64-bit MinGW (Windows 7+)
43 `x86_64-pc-windows-msvc` | ✓ | ✓ | 64-bit MSVC (Windows 7+)
44 `x86_64-unknown-linux-gnu` | ✓ | ✓ | 64-bit Linux (kernel 2.6.32+, glibc 2.11+)
45
46 [^missing-stack-probes]: Stack probes support is missing on
47   `aarch64-unknown-linux-gnu`, but it's planned to be implemented in the near
48   future. The implementation is tracked on [issue #77071][77071].
49
50 [77071]: https://github.com/rust-lang/rust/issues/77071
51
52 ## Tier 2
53
54 Tier 2 platforms can be thought of as "guaranteed to build". Automated tests
55 are not run so it's not guaranteed to produce a working build, but platforms
56 often work to quite a good degree and patches are always welcome!
57 Specifically, these platforms are required to have each of the following:
58
59 * Official binary releases are provided for the platform.
60 * Automated building is set up, but may not be running tests.
61 * Landing changes to the `rust-lang/rust` repository's master branch is gated on
62     platforms **building**. For some platforms only the standard library is
63     compiled, but for others `rustc` and `cargo` are too.
64
65 target | std | host | notes
66 -------|-----|------|-------
67 `aarch64-apple-darwin` | ✓ | ✓ | ARM64 macOS (11.0+, Big Sur+)
68 `aarch64-apple-ios` | ✓ |  | ARM64 iOS
69 `aarch64-fuchsia` | ✓ |  | ARM64 Fuchsia
70 `aarch64-linux-android` | ✓ |  | ARM64 Android
71 `aarch64-pc-windows-msvc` | ✓ | ✓ | ARM64 Windows MSVC
72 `aarch64-unknown-linux-musl` | ✓ | ✓ | ARM64 Linux with MUSL
73 `aarch64-unknown-none` | * |  | Bare ARM64, hardfloat
74 `aarch64-unknown-none-softfloat` | * |  | Bare ARM64, softfloat
75 `arm-linux-androideabi` | ✓ |  | ARMv7 Android
76 `arm-unknown-linux-gnueabi` | ✓ | ✓ | ARMv6 Linux (kernel 3.2, glibc 2.17)
77 `arm-unknown-linux-gnueabihf` | ✓ | ✓ | ARMv6 Linux, hardfloat (kernel 3.2, glibc 2.17)
78 `arm-unknown-linux-musleabi` | ✓ |  | ARMv6 Linux with MUSL
79 `arm-unknown-linux-musleabihf` | ✓ |  | ARMv6 Linux with MUSL, hardfloat
80 `armebv7r-none-eabi` | * |  | Bare ARMv7-R, Big Endian
81 `armebv7r-none-eabihf` | * |  | Bare ARMv7-R, Big Endian, hardfloat
82 `armv5te-unknown-linux-gnueabi` | ✓ |  | ARMv5TE Linux (kernel 4.4, glibc 2.23)
83 `armv5te-unknown-linux-musleabi` | ✓ |  | ARMv5TE Linux with MUSL
84 `armv7-linux-androideabi` | ✓ |  | ARMv7a Android
85 `armv7a-none-eabi` | * |  | Bare ARMv7-A
86 `armv7r-none-eabi` | * |  | Bare ARMv7-R
87 `armv7r-none-eabihf` | * |  | Bare ARMv7-R, hardfloat
88 `armv7-unknown-linux-gnueabi` | ✓ |   | ARMv7 Linux (kernel 4.15, glibc 2.27)
89 `armv7-unknown-linux-gnueabihf` | ✓ | ✓ | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
90 `armv7-unknown-linux-musleabi` | ✓ |   | ARMv7 Linux, MUSL
91 `armv7-unknown-linux-musleabihf` | ✓ |  | ARMv7 Linux with MUSL
92 `asmjs-unknown-emscripten` | ✓ |  | asm.js via Emscripten
93 `i586-pc-windows-msvc` | ✓ |  | 32-bit Windows w/o SSE
94 `i586-unknown-linux-gnu` | ✓ |  | 32-bit Linux w/o SSE (kernel 4.4, glibc 2.23)
95 `i586-unknown-linux-musl` | ✓ |  | 32-bit Linux w/o SSE, MUSL
96 `i686-linux-android` | ✓ |  | 32-bit x86 Android
97 `i686-unknown-freebsd` | ✓ |  | 32-bit FreeBSD
98 `i686-unknown-linux-musl` | ✓ |  | 32-bit Linux with MUSL
99 `mips-unknown-linux-gnu` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)
100 `mips-unknown-linux-musl` | ✓ |  | MIPS Linux with MUSL
101 `mips64-unknown-linux-gnuabi64` | ✓ | ✓ | MIPS64 Linux, n64 ABI (kernel 4.4, glibc 2.23)
102 `mips64-unknown-linux-muslabi64` | ✓ |  | MIPS64 Linux, n64 ABI, MUSL
103 `mips64el-unknown-linux-gnuabi64` | ✓ | ✓ | MIPS64 (LE) Linux, n64 ABI (kernel 4.4, glibc 2.23)
104 `mips64el-unknown-linux-muslabi64` | ✓ |  | MIPS64 (LE) Linux, n64 ABI, MUSL
105 `mipsel-unknown-linux-gnu` | ✓ | ✓ | MIPS (LE) Linux (kernel 4.4, glibc 2.23)
106 `mipsel-unknown-linux-musl` | ✓ |  | MIPS (LE) Linux with MUSL
107 `nvptx64-nvidia-cuda` | ✓ |  | --emit=asm generates PTX code that [runs on NVIDIA GPUs]
108 `powerpc-unknown-linux-gnu` | ✓ | ✓ | PowerPC Linux (kernel 2.6.32, glibc 2.11)
109 `powerpc64-unknown-linux-gnu` | ✓ | ✓ | PPC64 Linux (kernel 2.6.32, glibc 2.11)
110 `powerpc64le-unknown-linux-gnu` | ✓ | ✓ | PPC64LE Linux (kernel 3.10, glibc 2.17)
111 `riscv32i-unknown-none-elf` | * |  | Bare RISC-V (RV32I ISA)
112 `riscv32imac-unknown-none-elf` | * |  | Bare RISC-V (RV32IMAC ISA)
113 `riscv32imc-unknown-none-elf` | * |  | Bare RISC-V (RV32IMC ISA)
114 `riscv64gc-unknown-linux-gnu` | ✓ | ✓ | RISC-V Linux (kernel 4.20, glibc 2.29)
115 `riscv64gc-unknown-none-elf` | * |  | Bare RISC-V (RV64IMAFDC ISA)
116 `riscv64imac-unknown-none-elf` | * |  | Bare RISC-V (RV64IMAC ISA)
117 `s390x-unknown-linux-gnu` | ✓ | ✓ | S390x Linux (kernel 2.6.32, glibc 2.11)
118 `sparc64-unknown-linux-gnu` | ✓ |  | SPARC Linux (kernel 4.4, glibc 2.23)
119 `sparcv9-sun-solaris` | ✓ |  | SPARC Solaris 10/11, illumos
120 `thumbv6m-none-eabi` | * |  | Bare Cortex-M0, M0+, M1
121 `thumbv7em-none-eabi` | * |  | Bare Cortex-M4, M7
122 `thumbv7em-none-eabihf` | * |  | Bare Cortex-M4F, M7F, FPU, hardfloat
123 `thumbv7m-none-eabi` | * |  | Bare Cortex-M3
124 `thumbv7neon-linux-androideabi` | ✓ |  | Thumb2-mode ARMv7a Android with NEON
125 `thumbv7neon-unknown-linux-gnueabihf` | ✓ |  | Thumb2-mode ARMv7a Linux with NEON (kernel 4.4, glibc 2.23)
126 `thumbv8m.base-none-eabi` | * |  | ARMv8-M Baseline
127 `thumbv8m.main-none-eabi` | * |  | ARMv8-M Mainline
128 `thumbv8m.main-none-eabihf` | * |  | ARMv8-M Mainline, hardfloat
129 `wasm32-unknown-emscripten` | ✓ |  | WebAssembly via Emscripten
130 `wasm32-unknown-unknown` | ✓ |  | WebAssembly
131 `wasm32-wasi` | ✓ |  | WebAssembly with WASI
132 `x86_64-apple-ios` | ✓ |  | 64-bit x86 iOS
133 `x86_64-fortanix-unknown-sgx` | ✓ |  | [Fortanix ABI] for 64-bit Intel SGX
134 `x86_64-fuchsia` | ✓ |  | 64-bit Fuchsia
135 `x86_64-linux-android` | ✓ |  | 64-bit x86 Android
136 `x86_64-rumprun-netbsd` | ✓ |  | 64-bit NetBSD Rump Kernel
137 `x86_64-sun-solaris` | ✓ |  | 64-bit Solaris 10/11, illumos
138 `x86_64-unknown-freebsd` | ✓ | ✓ | 64-bit FreeBSD
139 `x86_64-unknown-illumos` | ✓ | ✓ | illumos
140 `x86_64-unknown-linux-gnux32` | ✓ |  | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
141 `x86_64-unknown-linux-musl` | ✓ | ✓ | 64-bit Linux with MUSL
142 `x86_64-unknown-netbsd` | ✓ | ✓ | NetBSD/amd64
143 `x86_64-unknown-redox` | ✓ |  | Redox OS
144
145 [Fortanix ABI]: https://edp.fortanix.com/
146
147 ## Tier 3
148
149 Tier 3 platforms are those which the Rust codebase has support for, but which
150 are not built or tested automatically, and may not work. Official builds are
151 not available.
152
153 target | std | host | notes
154 -------|-----|------|-------
155 `aarch64-apple-ios-macabi` | ? |  | Apple Catalyst on ARM64
156 `aarch64-apple-ios-sim` | ? |  | Apple iOS Simulator on ARM64
157 `aarch64-apple-tvos` | * |  | ARM64 tvOS
158 `aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
159 `aarch64-unknown-hermit` | ? |  |
160 `aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
161 `aarch64-unknown-netbsd` | ✓ | ✓ |
162 `aarch64-unknown-openbsd` | ✓ | ✓ | ARM64 OpenBSD
163 `aarch64-unknown-redox` | ? |  | ARM64 Redox OS
164 `aarch64-uwp-windows-msvc` | ? |  |
165 `aarch64-wrs-vxworks` | ? |  |
166 `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian)
167 `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI)
168 `armv4t-unknown-linux-gnueabi` | ? |  |
169 `armv5te-unknown-linux-uclibceabi` | ? |  | ARMv5TE Linux with uClibc
170 `armv6-unknown-freebsd` | ✓ | ✓ | ARMv6 FreeBSD
171 `armv6-unknown-netbsd-eabihf` | ? |  |
172 `armv7-apple-ios` | ✓ |  | ARMv7 iOS, Cortex-a8
173 `armv7-unknown-freebsd` | ✓ | ✓ | ARMv7 FreeBSD
174 `armv7-unknown-netbsd-eabihf` | ✓ | ✓ |
175 `armv7-wrs-vxworks-eabihf` | ? |  |
176 `armv7a-none-eabihf` | * | | ARM Cortex-A, hardfloat
177 `armv7s-apple-ios` | ✓ |  |
178 `avr-unknown-gnu-atmega328` | ✗ |  | AVR. Requires `-Z build-std=core`
179 `hexagon-unknown-linux-musl` | ? |  |
180 `i386-apple-ios` | ✓ |  | 32-bit x86 iOS
181 `i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+)
182 `i686-pc-windows-msvc` | ✓ |  | 32-bit Windows XP support
183 `i686-unknown-uefi` | ? |  | 32-bit UEFI
184 `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
185 `i686-unknown-netbsd` | ✓ | ✓ | NetBSD/i386 with SSE2
186 `i686-unknown-openbsd` | ✓ | ✓ | 32-bit OpenBSD
187 `i686-uwp-windows-gnu` | ? |  |
188 `i686-uwp-windows-msvc` | ? |  |
189 `i686-wrs-vxworks` | ? |  |
190 `mips-unknown-linux-uclibc` | ✓ |  | MIPS Linux with uClibc
191 `mipsel-unknown-linux-uclibc` | ✓ |  | MIPS (LE) Linux with uClibc
192 `mipsel-unknown-none` | * |  | Bare MIPS (LE) softfloat
193 `mipsel-sony-psp` | * |  | MIPS (LE) Sony PlayStation Portable (PSP)
194 `mipsisa32r6-unknown-linux-gnu` | ? |  |
195 `mipsisa32r6el-unknown-linux-gnu` | ? |  |
196 `mipsisa64r6-unknown-linux-gnuabi64` | ? |  |
197 `mipsisa64r6el-unknown-linux-gnuabi64` | ? |  |
198 `msp430-none-elf` | * |  | 16-bit MSP430 microcontrollers
199 `powerpc-unknown-linux-gnuspe` | ✓ |  | PowerPC SPE Linux
200 `powerpc-unknown-linux-musl` | ? |  |
201 `powerpc-unknown-netbsd` | ✓ | ✓ |
202 `powerpc-wrs-vxworks` | ? |  |
203 `powerpc-wrs-vxworks-spe` | ? |  |
204 `powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
205 `powerpc64-unknown-linux-musl` | ? |  |
206 `powerpc64-wrs-vxworks` | ? |  |
207 `powerpc64le-unknown-linux-musl` | ? |  |
208 `riscv64gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 4.20, musl 1.2.0)
209 `riscv32gc-unknown-linux-gnu` |   |   | RISC-V Linux (kernel 5.4, glibc 2.33)
210 `riscv32gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches)
211 `s390x-unknown-linux-musl` |  |  | S390x Linux (kernel 2.6.32, MUSL)
212 `sparc-unknown-linux-gnu` | ✓ |  | 32-bit SPARC Linux
213 `sparc64-unknown-netbsd` | ✓ | ✓ | NetBSD/sparc64
214 `sparc64-unknown-openbsd` | ? |  |
215 `thumbv7a-pc-windows-msvc` | ? |  |
216 `thumbv7a-uwp-windows-msvc` | ✓ |  |
217 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7a Linux with NEON, MUSL
218 `thumbv4t-none-eabi` | * |  | ARMv4T T32
219 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
220 `x86_64-apple-tvos` | * | | x86 64-bit tvOS
221 `x86_64-linux-kernel` | * |  | Linux kernel modules
222 `x86_64-pc-solaris` | ? |  |
223 `x86_64-pc-windows-msvc` | ✓ |  | 64-bit Windows XP support
224 `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
225 `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
226 `x86_64-unknown-hermit` | ? |  |
227 `x86_64-unknown-hermit-kernel` | ? |  | HermitCore kernel
228 `x86_64-unknown-l4re-uclibc` | ? |  |
229 `x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD
230 `x86_64-unknown-uefi` | ? |  |
231 `x86_64-uwp-windows-gnu` | ✓ |  |
232 `x86_64-uwp-windows-msvc` | ✓ |  |
233 `x86_64-wrs-vxworks` | ? |  |
234
235 [runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets