Skip to content

Conversation

@benhillis
Copy link
Member

This pull request moves common functionality from the service exe directory into common to avoid difficult future merges to the feature/wsl-for-apps branch.

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

This pull request refactors the WSL codebase by moving common functionality from the service executable directory (src/windows/service/exe/) into the shared common directory (src/windows/common/). This reorganization supports future merges to the feature/wsl-for-apps branch by reducing code duplication and establishing clearer component boundaries.

Key changes:

  • Moved the c_vmOwner constant from WslCoreVm.h to wslutil.h in the common directory
  • Relocated multiple networking, device management, and infrastructure classes to the common directory
  • Updated CMakeLists.txt files to reflect the new file locations
  • Fixed a duplicate LxssUserCallback.cpp entry in the service exe CMakeLists.txt

Reviewed changes

Copilot reviewed 7 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/windows/service/exe/WslCoreVm.h Removed c_vmOwner constant definition
src/windows/service/exe/WslCoreVm.cpp Updated references to use wsl::windows::common::wslutil::c_vmOwner
src/windows/service/exe/MirroredNetworking.cpp Updated reference to use wsl::windows::common::wslutil::c_vmOwner
src/windows/service/exe/CMakeLists.txt Removed entries for files moved to common, fixed duplicate entry
src/windows/common/wslutil.h Added c_vmOwner constant definition
src/windows/common/WslCore*.{h,cpp} Moved networking and DNS infrastructure classes
src/windows/common/VirtioNetworking.{h,cpp} Moved Virtio networking implementation
src/windows/common/NatNetworking.{h,cpp} Moved NAT networking implementation, removed WslCoreVm.h include
src/windows/common/LxssSecurity.{h,cpp} Moved security helper functions
src/windows/common/INetworkingEngine.h Moved networking engine interface
src/windows/common/GuestDeviceManager.{h,cpp} Moved guest device management
src/windows/common/GnsChannel.{h,cpp} Moved GNS channel implementation
src/windows/common/GnsPortTrackerChannel.{h,cpp} Moved port tracker channel
src/windows/common/DnsTunnelingChannel.{h,cpp} Moved DNS tunneling channel
src/windows/common/DnsResolver.{h,cpp} Moved DNS resolver implementation
src/windows/common/Dmesg.{h,cpp} Moved dmesg collection functionality
src/windows/common/DeviceHostProxy.{h,cpp} Moved device host proxy
src/windows/common/RingBuffer.{h,cpp} Moved ring buffer implementation
src/windows/common/CMakeLists.txt Added entries for all moved files

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@benhillis benhillis force-pushed the user/benhill/move_common_functionality branch from 2e80a38 to 6881d0f Compare November 26, 2025 17:10
@benhillis benhillis merged commit be82716 into master Nov 26, 2025
6 checks passed
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.

3 participants