Skip to content

Conversation

@justus-camp-microsoft
Copy link
Contributor

Part of #1061, migrate openvmm_entry off of winapi

Copilot AI review requested due to automatic review settings February 10, 2026 21:03
Comment on lines -118 to -129
"consoleapi",
"handleapi",
"memoryapi",
"namedpipeapi",
"processenv",
"realtimeapiset",
"synchapi",
"winbase",
"wincon",
"winnls",
"winnt",
"winsock2",
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

Copilot AI left a 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 winapi access mask constants with windows-sys equivalents in Windows named-pipe serial binding.
  • Swapped the Windows-only dependency from winapi to windows-sys (enabling Win32_Foundation).
  • Updated Cargo.lock to 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.

Comment on lines 240 to +243
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,
Copy link

Copilot AI Feb 10, 2026

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

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.

2 participants