windows: enable winapi std for RawHandle interop - #366
Conversation
Your change seems reasonable, but can this be tested in CI? Maybe using the Just as a PSA, as this is marked as a blocker by other projects: since Windows 10 v1903 (released in 2019), user-space applications can't directly communicate with USB authenticators unless running as Administrator. This breaks the library on Windows for most users. Firefox uses Windows' platform WebAuthn APIs directly where they're available, and has similar wrappers for Android and macOS. These won't be supported by Applications that support Windows should migrate to the Windows WebAuthn APIs, and shouldn't depend on |
Cargo resolver 2 keeps features enabled only by dev-dependencies out of normal dependencies.
Under resolver 2, a Windows consumer fails at
DeviceCapabilities::new(self.file.as_raw_handle())becausecore::ffi::c_voidandwinapi::ctypes::c_voidare different types. The package's legacy-resolver dev build hides this becauserpasswordenableswinapi/std.Enabling
stdon the direct Windowswinapidependency makes the raw-handle types compatible without relying on feature unification from an unrelated dev-dependency.A minimal resolver-2 consumer on Rust 1.97 targeting
x86_64-pc-windows-msvcfails before this patch and passes afterward.cargo test --features crypto_dummy --no-default-featuresalso passes.