pal: Migrate delayload to windows-sys from winapi#2774
Merged
damanm24 merged 9 commits intomicrosoft:mainfrom Feb 24, 2026
Merged
pal: Migrate delayload to windows-sys from winapi#2774damanm24 merged 9 commits intomicrosoft:mainfrom
windows-sys from winapi#2774damanm24 merged 9 commits intomicrosoft:mainfrom
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
Contributor
There was a problem hiding this comment.
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. |
smalis-msft
reviewed
Feb 9, 2026
window-sys from winapiwindows-sys from winapi
justus-camp-microsoft
approved these changes
Feb 24, 2026
benhillis
approved these changes
Feb 24, 2026
Member
benhillis
left a comment
There was a problem hiding this comment.
This looks good to me, Brian or John might want to take a quick look though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressing a follow-up item from: #2633, to fixup pal to move away from
winapiusage as it's no longer supported.