From 242214c54697f9ef88a60fca8718b0baa1b207d0 Mon Sep 17 00:00:00 2001
From: Zanie Blue
Date: Mon, 18 Aug 2025 12:57:27 -0500
Subject: [PATCH] Add an `aarch64-pc-windows-msvc` target (#15347)
I needed this and was surprised it didn't exist!
---------
Co-authored-by: konsti
---
crates/uv-configuration/src/target_triple.rs | 14 ++++++++++++++
docs/reference/cli.md | 5 +++++
uv.schema.json | 5 +++++
3 files changed, 24 insertions(+)
diff --git a/crates/uv-configuration/src/target_triple.rs b/crates/uv-configuration/src/target_triple.rs
index 842fb39a7..d64fcf1b1 100644
--- a/crates/uv-configuration/src/target_triple.rs
+++ b/crates/uv-configuration/src/target_triple.rs
@@ -28,6 +28,12 @@ pub enum TargetTriple {
#[serde(alias = "x8664-pc-windows-msvc")]
X8664PcWindowsMsvc,
+ /// An ARM64 Windows target.
+ #[cfg_attr(feature = "clap", value(name = "aarch64-pc-windows-msvc"))]
+ #[serde(rename = "aarch64-pc-windows-msvc")]
+ #[serde(alias = "arm64-pc-windows-msvc")]
+ Aarch64PcWindowsMsvc,
+
/// A 32-bit x86 Windows target.
#[cfg_attr(feature = "clap", value(name = "i686-pc-windows-msvc"))]
#[serde(rename = "i686-pc-windows-msvc")]
@@ -237,6 +243,7 @@ impl TargetTriple {
pub fn platform(self) -> Platform {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => Platform::new(Os::Windows, Arch::X86_64),
+ Self::Aarch64PcWindowsMsvc => Platform::new(Os::Windows, Arch::Aarch64),
Self::Linux | Self::X8664UnknownLinuxGnu => Platform::new(
Os::Manylinux {
major: 2,
@@ -468,6 +475,7 @@ impl TargetTriple {
pub fn platform_machine(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "x86_64",
+ Self::Aarch64PcWindowsMsvc => "ARM64",
Self::Linux | Self::X8664UnknownLinuxGnu => "x86_64",
Self::Macos | Self::Aarch64AppleDarwin => "arm64",
Self::I686PcWindowsMsvc => "x86",
@@ -509,6 +517,7 @@ impl TargetTriple {
pub fn platform_system(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "Windows",
+ Self::Aarch64PcWindowsMsvc => "Windows",
Self::Linux | Self::X8664UnknownLinuxGnu => "Linux",
Self::Macos | Self::Aarch64AppleDarwin => "Darwin",
Self::I686PcWindowsMsvc => "Windows",
@@ -550,6 +559,7 @@ impl TargetTriple {
pub fn platform_version(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "",
+ Self::Aarch64PcWindowsMsvc => "",
Self::Linux | Self::X8664UnknownLinuxGnu => "",
Self::Macos | Self::Aarch64AppleDarwin => "",
Self::I686PcWindowsMsvc => "",
@@ -594,6 +604,7 @@ impl TargetTriple {
pub fn platform_release(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "",
+ Self::Aarch64PcWindowsMsvc => "",
Self::Linux | Self::X8664UnknownLinuxGnu => "",
Self::Macos | Self::Aarch64AppleDarwin => "",
Self::I686PcWindowsMsvc => "",
@@ -637,6 +648,7 @@ impl TargetTriple {
pub fn os_name(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "nt",
+ Self::Aarch64PcWindowsMsvc => "nt",
Self::Linux | Self::X8664UnknownLinuxGnu => "posix",
Self::Macos | Self::Aarch64AppleDarwin => "posix",
Self::I686PcWindowsMsvc => "nt",
@@ -678,6 +690,7 @@ impl TargetTriple {
pub fn sys_platform(self) -> &'static str {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => "win32",
+ Self::Aarch64PcWindowsMsvc => "win32",
Self::Linux | Self::X8664UnknownLinuxGnu => "linux",
Self::Macos | Self::Aarch64AppleDarwin => "darwin",
Self::I686PcWindowsMsvc => "win32",
@@ -719,6 +732,7 @@ impl TargetTriple {
pub fn manylinux_compatible(self) -> bool {
match self {
Self::Windows | Self::X8664PcWindowsMsvc => false,
+ Self::Aarch64PcWindowsMsvc => false,
Self::Linux | Self::X8664UnknownLinuxGnu => true,
Self::Macos | Self::Aarch64AppleDarwin => false,
Self::I686PcWindowsMsvc => false,
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 4ed92282b..8832197a1 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -1181,6 +1181,7 @@ environment in the project.
linux: An alias for x86_64-unknown-linux-gnu, the default target for Linux
macos: An alias for aarch64-apple-darwin, the default target for macOS
x86_64-pc-windows-msvc: A 64-bit x86 Windows target
+aarch64-pc-windows-msvc: An ARM64 Windows target
i686-pc-windows-msvc: A 32-bit x86 Windows target
x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices
@@ -1778,6 +1779,7 @@ interpreter. Use --universal to display the tree for all platforms,
linux: An alias for x86_64-unknown-linux-gnu, the default target for Linux
macos: An alias for aarch64-apple-darwin, the default target for macOS
x86_64-pc-windows-msvc: A 64-bit x86 Windows target
+aarch64-pc-windows-msvc: An ARM64 Windows target
i686-pc-windows-msvc: A 32-bit x86 Windows target
x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices
@@ -3557,6 +3559,7 @@ by --python-version.
linux: An alias for x86_64-unknown-linux-gnu, the default target for Linux
macos: An alias for aarch64-apple-darwin, the default target for macOS
x86_64-pc-windows-msvc: A 64-bit x86 Windows target
+aarch64-pc-windows-msvc: An ARM64 Windows target
i686-pc-windows-msvc: A 32-bit x86 Windows target
x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices
@@ -3826,6 +3829,7 @@ be used with caution, as it can modify the system Python installation.
linux: An alias for x86_64-unknown-linux-gnu, the default target for Linux
macos: An alias for aarch64-apple-darwin, the default target for macOS
x86_64-pc-windows-msvc: A 64-bit x86 Windows target
+aarch64-pc-windows-msvc: An ARM64 Windows target
i686-pc-windows-msvc: A 32-bit x86 Windows target
x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices
@@ -4113,6 +4117,7 @@ should be used with caution, as it can modify the system Python installation.linux: An alias for x86_64-unknown-linux-gnu, the default target for Linux
macos: An alias for aarch64-apple-darwin, the default target for macOS
x86_64-pc-windows-msvc: A 64-bit x86 Windows target
+aarch64-pc-windows-msvc: An ARM64 Windows target
i686-pc-windows-msvc: A 32-bit x86 Windows target
x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices
diff --git a/uv.schema.json b/uv.schema.json
index 4671d03c2..a86155c32 100644
--- a/uv.schema.json
+++ b/uv.schema.json
@@ -2251,6 +2251,11 @@
"type": "string",
"const": "x86_64-pc-windows-msvc"
},
+ {
+ "description": "An ARM64 Windows target.",
+ "type": "string",
+ "const": "aarch64-pc-windows-msvc"
+ },
{
"description": "A 32-bit x86 Windows target.",
"type": "string",