Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/uv-configuration/src/target_triple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 => "",
Expand Down Expand Up @@ -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 => "",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,7 @@ environment in the project.</p>
<li><code>linux</code>: An alias for <code>x86_64-unknown-linux-gnu</code>, the default target for Linux</li>
<li><code>macos</code>: An alias for <code>aarch64-apple-darwin</code>, the default target for macOS</li>
<li><code>x86_64-pc-windows-msvc</code>: A 64-bit x86 Windows target</li>
<li><code>aarch64-pc-windows-msvc</code>: An ARM64 Windows target</li>
<li><code>i686-pc-windows-msvc</code>: A 32-bit x86 Windows target</li>
<li><code>x86_64-unknown-linux-gnu</code>: An x86 Linux target. Equivalent to <code>x86_64-manylinux_2_28</code></li>
<li><code>aarch64-apple-darwin</code>: An ARM-based macOS target, as seen on Apple Silicon devices</li>
Expand Down Expand Up @@ -1778,6 +1779,7 @@ interpreter. Use <code>--universal</code> to display the tree for all platforms,
<li><code>linux</code>: An alias for <code>x86_64-unknown-linux-gnu</code>, the default target for Linux</li>
<li><code>macos</code>: An alias for <code>aarch64-apple-darwin</code>, the default target for macOS</li>
<li><code>x86_64-pc-windows-msvc</code>: A 64-bit x86 Windows target</li>
<li><code>aarch64-pc-windows-msvc</code>: An ARM64 Windows target</li>
<li><code>i686-pc-windows-msvc</code>: A 32-bit x86 Windows target</li>
<li><code>x86_64-unknown-linux-gnu</code>: An x86 Linux target. Equivalent to <code>x86_64-manylinux_2_28</code></li>
<li><code>aarch64-apple-darwin</code>: An ARM-based macOS target, as seen on Apple Silicon devices</li>
Expand Down Expand Up @@ -3557,6 +3559,7 @@ by <code>--python-version</code>.</p>
<li><code>linux</code>: An alias for <code>x86_64-unknown-linux-gnu</code>, the default target for Linux</li>
<li><code>macos</code>: An alias for <code>aarch64-apple-darwin</code>, the default target for macOS</li>
<li><code>x86_64-pc-windows-msvc</code>: A 64-bit x86 Windows target</li>
<li><code>aarch64-pc-windows-msvc</code>: An ARM64 Windows target</li>
<li><code>i686-pc-windows-msvc</code>: A 32-bit x86 Windows target</li>
<li><code>x86_64-unknown-linux-gnu</code>: An x86 Linux target. Equivalent to <code>x86_64-manylinux_2_28</code></li>
<li><code>aarch64-apple-darwin</code>: An ARM-based macOS target, as seen on Apple Silicon devices</li>
Expand Down Expand Up @@ -3826,6 +3829,7 @@ be used with caution, as it can modify the system Python installation.</p>
<li><code>linux</code>: An alias for <code>x86_64-unknown-linux-gnu</code>, the default target for Linux</li>
<li><code>macos</code>: An alias for <code>aarch64-apple-darwin</code>, the default target for macOS</li>
<li><code>x86_64-pc-windows-msvc</code>: A 64-bit x86 Windows target</li>
<li><code>aarch64-pc-windows-msvc</code>: An ARM64 Windows target</li>
<li><code>i686-pc-windows-msvc</code>: A 32-bit x86 Windows target</li>
<li><code>x86_64-unknown-linux-gnu</code>: An x86 Linux target. Equivalent to <code>x86_64-manylinux_2_28</code></li>
<li><code>aarch64-apple-darwin</code>: An ARM-based macOS target, as seen on Apple Silicon devices</li>
Expand Down Expand Up @@ -4113,6 +4117,7 @@ should be used with caution, as it can modify the system Python installation.</p
<li><code>linux</code>: An alias for <code>x86_64-unknown-linux-gnu</code>, the default target for Linux</li>
<li><code>macos</code>: An alias for <code>aarch64-apple-darwin</code>, the default target for macOS</li>
<li><code>x86_64-pc-windows-msvc</code>: A 64-bit x86 Windows target</li>
<li><code>aarch64-pc-windows-msvc</code>: An ARM64 Windows target</li>
<li><code>i686-pc-windows-msvc</code>: A 32-bit x86 Windows target</li>
<li><code>x86_64-unknown-linux-gnu</code>: An x86 Linux target. Equivalent to <code>x86_64-manylinux_2_28</code></li>
<li><code>aarch64-apple-darwin</code>: An ARM-based macOS target, as seen on Apple Silicon devices</li>
Expand Down
5 changes: 5 additions & 0 deletions uv.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.