Skip to content

windows: enable winapi std for RawHandle interop#366

Open
iiTONELOC wants to merge 1 commit into
mozilla:ctap2-2021from
iiTONELOC:fix/windows-winapi-std
Open

windows: enable winapi std for RawHandle interop#366
iiTONELOC wants to merge 1 commit into
mozilla:ctap2-2021from
iiTONELOC:fix/windows-winapi-std

Conversation

@iiTONELOC

Copy link
Copy Markdown

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()) because core::ffi::c_void and winapi::ctypes::c_void are different types. The package's legacy-resolver dev build hides this because rpassword enables winapi/std.

Enabling std on the direct Windows winapi dependency 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-msvc fails before this patch and passes afterward. cargo test --features crypto_dummy --no-default-features also passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant