-
Notifications
You must be signed in to change notification settings - Fork 167
openvmm_entry: migrate from winapi to windows-sys #2787
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?
openvmm_entry: migrate from winapi to windows-sys #2787
Conversation
| "consoleapi", | ||
| "handleapi", | ||
| "memoryapi", | ||
| "namedpipeapi", | ||
| "processenv", | ||
| "realtimeapiset", | ||
| "synchapi", | ||
| "winbase", | ||
| "wincon", | ||
| "winnls", | ||
| "winnt", | ||
| "winsock2", |
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.
As far as I can tell, these were unneeded features besides the winnt feature.
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.
Very possible, we don't have a solution for finding unused features today.
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
Migrates the openvmm_entry crate’s Windows API usage from winapi to windows-sys, aligning with the repo’s ongoing effort to consolidate Windows dependency usage (Issue #1061).
Changes:
- Replaced
winapiaccess mask constants withwindows-sysequivalents in Windows named-pipe serial binding. - Swapped the Windows-only dependency from
winapitowindows-sys(enablingWin32_Foundation). - Updated
Cargo.lockto reflect the dependency change.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openvmm/openvmm_entry/src/serial_io.rs | Uses windows-sys constants for pipe access flags instead of winapi. |
| openvmm/openvmm_entry/Cargo.toml | Replaces the Windows-only winapi dependency with windows-sys and updates enabled features. |
| Cargo.lock | Updates the lock entry to remove winapi from openvmm_entry and include windows-sys. |
| let pipe = pal::windows::pipe::new_named_pipe( | ||
| path, | ||
| winapi::um::winnt::GENERIC_READ | winapi::um::winnt::GENERIC_WRITE, | ||
| windows_sys::Win32::Foundation::GENERIC_READ | ||
| | windows_sys::Win32::Foundation::GENERIC_WRITE, |
Copilot
AI
Feb 10, 2026
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.
The access mask constants are referenced via long fully-qualified paths twice. Consider importing GENERIC_READ/GENERIC_WRITE (e.g., with a use inside this #[cfg(windows)] block) to reduce verbosity and make future refactors easier.
Part of #1061, migrate openvmm_entry off of winapi