Skip to content

Commit

Permalink
Add Apple visionOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinPerez committed May 23, 2024
1 parent be4ba83 commit 193bb7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ untrusted = { version = "0.9" }
[target.'cfg(any(target_arch = "aarch64", target_arch = "arm", target_arch = "x86",target_arch = "x86_64"))'.dependencies]
spin = { version = "0.9.8", default-features = false, features = ["once"] }

[target.'cfg(all(any(target_os = "android", target_os = "linux", any(target_os = "ios", target_os = "macos", target_os = "tvos")), any(target_arch = "aarch64", target_arch = "arm")))'.dependencies]
[target.'cfg(all(any(target_os = "android", target_os = "linux", target_vendor = "apple"), any(target_arch = "aarch64", target_arch = "arm")))'.dependencies]
libc = { version = "0.2.148", default-features = false }

[target.'cfg(all(target_arch = "aarch64", target_os = "windows"))'.dependencies]
Expand All @@ -174,7 +174,7 @@ wasm-bindgen-test = { version = "0.3.37", default-features = false }
libc = { version = "0.2.148", default-features = false }

[build-dependencies]
cc = { version = "1.0.83", default-features = false }
cc = { version = "1.0.94", default-features = false }

[features]
# These features are documented in the top-level module's documentation.
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const NASM: &str = "nasm";

/// Operating systems that have the same ABI as macOS on every architecture
/// mentioned in `ASM_TARGETS`.
const MACOS_ABI: &[&str] = &["ios", MACOS, "tvos"];
const MACOS_ABI: &[&str] = &["ios", MACOS, "tvos", "visionos"];

const MACOS: &str = "macos";
const WINDOWS: &str = "windows";
Expand Down
3 changes: 1 addition & 2 deletions src/cpu/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ mod abi_assumptions {
// detection.

cfg_if::cfg_if! {
if #[cfg(all(target_arch = "aarch64",
any(target_os = "ios", target_os = "macos", target_os = "tvos")))] {
if #[cfg(all(target_arch = "aarch64", target_vendor = "apple"))] {
mod darwin;
use darwin as detect;
} else if #[cfg(all(target_arch = "aarch64", target_os = "fuchsia"))] {
Expand Down
4 changes: 1 addition & 3 deletions src/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,14 @@ impl crate::sealed::Sealed for SystemRandom {}
target_os = "haiku",
target_os = "hermit",
target_os = "illumos",
target_os = "ios",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
target_os = "tvos",
target_os = "vita",
target_os = "windows",
target_vendor = "apple",
all(
target_arch = "wasm32",
any(
Expand Down

0 comments on commit 193bb7c

Please sign in to comment.