cleanup: move common functonality out of service exe#13788
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_vmOwnerconstant fromWslCoreVm.htowslutil.hin 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.cppentry 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.
2e80a38 to
6881d0f
Compare
Brian-Perkins
approved these changes
Nov 26, 2025
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.
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.