Skip to content
Merged
Changes from 2 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
23 changes: 22 additions & 1 deletion crates/uv-configuration/src/target_triple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,15 @@ pub enum TargetTriple {
X8664LinuxAndroid,

/// A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.
// See https://pyodide.org/en/stable/development/abi/312.html
Comment thread
hoodmane marked this conversation as resolved.
Outdated
#[cfg_attr(feature = "clap", value(name = "wasm32-pyodide2024"))]
Wasm32Pyodide2024,

/// A wasm32 target using the Pyodide 2025 platform. Meant for use with Python 3.13.
// See https://pyodide.org/en/stable/development/abi/313.html
#[cfg_attr(feature = "clap", value(name = "wasm32-pyodide2025"))]
Wasm32Pyodide2025,

/// An ARM64 target for iOS device
///
/// By default, iOS 13.0 is used, but respects the `IPHONEOS_DEPLOYMENT_TARGET`
Expand Down Expand Up @@ -624,6 +630,13 @@ impl TargetTriple {
},
Arch::Wasm32,
),
Self::Wasm32Pyodide2025 => Platform::new(
Os::Pyodide {
major: 2025,
minor: 0,
},
Arch::Wasm32,
),
Self::Aarch64LinuxAndroid => {
let api_level = android_api_level().map_or(24, |api_level| {
debug!("Found Android API level: {}", api_level);
Expand Down Expand Up @@ -725,6 +738,7 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => "aarch64",
Self::X8664LinuxAndroid => "x86_64",
Self::Wasm32Pyodide2024 => "wasm32",
Self::Wasm32Pyodide2025 => "wasm32",
Self::Arm64Ios => "arm64",
Self::Arm64IosSimulator => "arm64",
Self::X8664IosSimulator => "x86_64",
Expand Down Expand Up @@ -773,6 +787,7 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => "Android",
Self::X8664LinuxAndroid => "Android",
Self::Wasm32Pyodide2024 => "Emscripten",
Self::Wasm32Pyodide2025 => "Emscripten",
Self::Arm64Ios => "iOS",
Self::Arm64IosSimulator => "iOS",
Self::X8664IosSimulator => "iOS",
Expand Down Expand Up @@ -824,6 +839,7 @@ impl TargetTriple {
// https://github.com/emscripten-core/emscripten/blob/4.0.8/system/lib/libc/emscripten_syscall_stubs.c#L63
// It doesn't really seem to mean anything? But for completeness we include it here.
Self::Wasm32Pyodide2024 => "#1",
Self::Wasm32Pyodide2025 => "#1",
Self::Arm64Ios => "",
Self::Arm64IosSimulator => "",
Self::X8664IosSimulator => "",
Expand Down Expand Up @@ -872,8 +888,10 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => "",
Self::X8664LinuxAndroid => "",
// This is the Emscripten compiler version for Pyodide 2024.
// See https://pyodide.org/en/stable/development/abi.html#pyodide-2024-0
// See https://pyodide.org/en/stable/development/abi/312.html
Self::Wasm32Pyodide2024 => "3.1.58",
// See https://pyodide.org/en/stable/development/abi/313.html
Self::Wasm32Pyodide2025 => "4.0.9",
Self::Arm64Ios => "",
Self::Arm64IosSimulator => "",
Self::X8664IosSimulator => "",
Expand Down Expand Up @@ -922,6 +940,7 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => "posix",
Self::X8664LinuxAndroid => "posix",
Self::Wasm32Pyodide2024 => "posix",
Self::Wasm32Pyodide2025 => "posix",
Self::Arm64Ios => "posix",
Self::Arm64IosSimulator => "posix",
Self::X8664IosSimulator => "posix",
Expand Down Expand Up @@ -970,6 +989,7 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => "android",
Self::X8664LinuxAndroid => "android",
Self::Wasm32Pyodide2024 => "emscripten",
Self::Wasm32Pyodide2025 => "emscripten",
Self::Arm64Ios => "ios",
Self::Arm64IosSimulator => "ios",
Self::X8664IosSimulator => "ios",
Expand Down Expand Up @@ -1018,6 +1038,7 @@ impl TargetTriple {
Self::Aarch64LinuxAndroid => false,
Self::X8664LinuxAndroid => false,
Self::Wasm32Pyodide2024 => false,
Self::Wasm32Pyodide2025 => false,
Self::Arm64Ios => false,
Self::Arm64IosSimulator => false,
Self::X8664IosSimulator => false,
Expand Down
Loading