Skip to content

Commit e3aa60d

Browse files
Rollup merge of #142475 - wesleywiser:windows_msvc_maintainers, r=ChrisDenton
Add platform support docs & maintainers for *-windows-msvc Thanks to `@ChrisDenton,` `@dpaoliello,` `@lambdageek` and `@sivadeilra` for agreeing to be target maintainers! cc #113739
2 parents 52894f9 + bdc531e commit e3aa60d

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
- [\*-unknown-openbsd](platform-support/openbsd.md)
114114
- [\*-unknown-redox](platform-support/redox.md)
115115
- [\*-unknown-uefi](platform-support/unknown-uefi.md)
116+
- [\*-unknown-windows-msvc](platform-support/windows-msvc.md)
116117
- [\*-uwp-windows-msvc](platform-support/uwp-windows-msvc.md)
117118
- [\*-wrs-vxworks](platform-support/vxworks.md)
118119
- [wasm32-wasip1](platform-support/wasm32-wasip1.md)

src/doc/rustc/src/platform-support.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ target | notes
3434
-------|-------
3535
[`aarch64-apple-darwin`](platform-support/apple-darwin.md) | ARM64 macOS (11.0+, Big Sur+)
3636
`aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1+, glibc 2.17+)
37-
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 10+, Windows Server 2016+, Pentium 4) [^x86_32-floats-return-ABI] [^win32-msvc-alignment]
37+
[`i686-pc-windows-msvc`](platform-support/windows-msvc.md) | 32-bit MSVC (Windows 10+, Windows Server 2016+, Pentium 4) [^x86_32-floats-return-ABI] [^win32-msvc-alignment]
3838
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+, Pentium 4) [^x86_32-floats-return-ABI]
3939
[`x86_64-apple-darwin`](platform-support/apple-darwin.md) | 64-bit macOS (10.12+, Sierra+)
4040
[`x86_64-pc-windows-gnu`](platform-support/windows-gnu.md) | 64-bit MinGW (Windows 10+, Windows Server 2016+)
41-
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 10+, Windows Server 2016+)
41+
[`x86_64-pc-windows-msvc`](platform-support/windows-msvc.md) | 64-bit MSVC (Windows 10+, Windows Server 2016+)
4242
`x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+)
4343

4444
[^x86_32-floats-return-ABI]: Due to limitations of the C ABI, floating-point support on `i686` targets is non-compliant: floating-point return values are passed via an x87 register, so NaN payload bits can be lost. Functions with the default Rust ABI are not affected. See [issue #115567][x86-32-float-return-issue].
@@ -88,7 +88,7 @@ so Rustup may install the documentation for a similar tier 1 target instead.
8888

8989
target | notes
9090
-------|-------
91-
`aarch64-pc-windows-msvc` | ARM64 Windows MSVC
91+
[`aarch64-pc-windows-msvc`](platform-support/windows-msvc.md) | ARM64 Windows MSVC
9292
`aarch64-unknown-linux-musl` | ARM64 Linux with musl 1.2.3
9393
[`aarch64-unknown-linux-ohos`](platform-support/openharmony.md) | ARM64 OpenHarmony
9494
`arm-unknown-linux-gnueabi` | Armv6 Linux (kernel 3.2+, glibc 2.17)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# `*-pc-windows-msvc`
2+
3+
Windows MSVC targets.
4+
5+
**Tier 1 with host tools:**
6+
7+
- `i686-pc-windows-msvc`: Windows on 32-bit x86.
8+
- `x86_64-pc-windows-msvc`: Windows on 64-bit x86.
9+
10+
**Tier 2 with host tools:**
11+
12+
- `aarch64-pc-windows-msvc`: Windows on ARM64.
13+
14+
## Target maintainers
15+
16+
[@ChrisDenton](https://github.com/ChrisDenton)
17+
[@dpaoliello](https://github.com/dpaoliello)
18+
[@lambdageek](https://github.com/lambdageek)
19+
[@sivadeilra](https://github.com/sivadeilra)
20+
[@wesleywiser](https://github.com/wesleywiser)
21+
22+
## Requirements
23+
24+
### OS version
25+
26+
Windows 10 or higher is required for client installs, Windows Server 2016 or higher is required for server installs.
27+
28+
### Host tooling
29+
30+
The minimum supported Visual Studio version is 2017 but this support is not actively tested in CI.
31+
It is **highly** recommended to use the latest version of VS (currently VS 2022).
32+
33+
### Platform details
34+
35+
These targets fully implement the Rust standard library.
36+
37+
The `extern "C"` calling convention conforms to Microsoft's default calling convention for the given architecture: [`__cdecl`] on `i686`, [`x64`] on `x86_64` and [`ARM64`] on `aarch64`.
38+
39+
The `*-windows-msvc` targets produce PE/COFF binaries with CodeView debuginfo, the native formats used on Windows.
40+
41+
[`__cdecl`]: https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170
42+
[`x64`]: https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
43+
[`ARM64`]: https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170
44+
45+
## Building Rust programs
46+
47+
These targets are distributed via `rustup` and can be installed via `rustup component add [--toolchain {name}] {target}`.
48+
49+
For example, adding the 32-bit x86 target to the `nightly` toolchain:
50+
51+
```text
52+
rustup component add --toolchain nightly i686-pc-windows-msvc
53+
```
54+
55+
or adding the ARM64 target to the active toolchain:
56+
57+
```text
58+
rustup component add aarch64-pc-windows-msvc
59+
```
60+
61+
## Testing
62+
63+
There are no special requirements for testing and running this target.
64+
65+
## Cross-compilation toolchains and C code
66+
67+
Architectural cross-compilation from one Windows host to a different Windows platform is natively supported by the MSVC toolchain provided the appropriate components are selected when using the VS Installer.
68+
69+
Cross-compilation from a non-Windows host to a `*-windows-msvc` target _may_ be possible but is not supported.

0 commit comments

Comments
 (0)