-
Notifications
You must be signed in to change notification settings - Fork 167
pal: Migrate delayload to windows-sys from winapi
#2774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR continues the repo’s migration away from winapi by updating pal’s delay-load helper and removing winapi usage from the Windows DNS resolver bindings in consomme.
Changes:
- Remove
winapi“keepalive” usage fromconsomme’s Windows DNS API bindings and drop thewinapidependency from that crate. - Update
pal::delayload!to usewindows-sys(and introducewindows-result) instead ofwinapi. - Add unit tests for
pal::delayload!behavior (present/missing functions and DLLs).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vm/devices/net/net_consomme/consomme/src/dns_resolver/windows/api.rs | Removes the winapi keepalive import; continues using pal::delayload! with windows-sys DNS types. |
| vm/devices/net/net_consomme/consomme/Cargo.toml | Drops winapi from Windows-only dependencies. |
| support/pal/src/windows.rs | Migrates delayload! internals away from winapi, updates Win32 error/HRESULT conversion, and adds tests. |
| support/pal/Cargo.toml | Adds windows-result and a windows-sys dependency block for pal. |
| Cargo.toml | Adds workspace dependency entry for windows-result. |
| Cargo.lock | Updates lockfile for dependency graph changes. |
window-sys from winapiwindows-sys from winapi
Addressing a follow-up item from: #2633, to fixup pal to move away from
winapiusage as it's no longer supported.