Skip to content

Commit 7bbc307

Browse files
poliorceticsbriansmith
authored andcommitted
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.
1 parent cfbd46b commit 7bbc307

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ spin = { version = "0.9.2", default-features = false, features = ["once"] }
174174
libc = { version = "0.2.100", default-features = false }
175175

176176
[target.'cfg(all(target_arch = "aarch64", target_os = "windows"))'.dependencies]
177-
winapi = { version = "0.3.9", default-features = false, features = ["ntsecapi", "wtypesbase", "processthreadsapi"] }
177+
windows-sys = { version = "0.48", features = ["Win32_Foundation", "Win32_System_Threading"] }
178178

179179
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
180180
wasm-bindgen-test = { version = "0.3.26", default-features = false }

src/cpu/arm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ pub fn setup() {
119119
let mut features = NEON.mask;
120120

121121
let result = unsafe {
122-
winapi::um::processthreadsapi::IsProcessorFeaturePresent(
123-
winapi::um::winnt::PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE,
122+
windows_sys::Win32::System::Threading::IsProcessorFeaturePresent(
123+
windows_sys::Win32::System::Threading::PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE,
124124
)
125125
};
126126

0 commit comments

Comments
 (0)