From f493f89412c0f3ae3a9e0e86197a886839b0d39c Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Tue, 7 Mar 2023 16:19:14 +0100 Subject: [PATCH] deps: Move from `winapi` to `windows-sys` `winapi` is in maintenance mode and the new blessed way to access Windows APIs are the `windows` and `windows-sys` crates. I don't think any types of `winapi` were exposed in the public API so I used `windows-sys` since it has much faster compile times. --- Cargo.toml | 2 +- src/cpu/arm.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 925c990ebf..9e1791d813 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,7 +174,7 @@ spin = { version = "0.9.2", default-features = false, features = ["once"] } libc = { version = "0.2.100", default-features = false } [target.'cfg(all(target_arch = "aarch64", target_os = "windows"))'.dependencies] -winapi = { version = "0.3.9", default-features = false, features = ["ntsecapi", "wtypesbase", "processthreadsapi"] } +windows-sys = { version = "0.48", features = ["Win32_Foundation", "Win32_System_Threading"] } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = { version = "0.3.26", default-features = false } diff --git a/src/cpu/arm.rs b/src/cpu/arm.rs index 4fa22bc981..6f6ee2a90e 100644 --- a/src/cpu/arm.rs +++ b/src/cpu/arm.rs @@ -119,8 +119,8 @@ pub fn setup() { let mut features = NEON.mask; let result = unsafe { - winapi::um::processthreadsapi::IsProcessorFeaturePresent( - winapi::um::winnt::PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE, + windows_sys::Win32::System::Threading::IsProcessorFeaturePresent( + windows_sys::Win32::System::Threading::PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE, ) };