Out-of-process WSL plugin runtime
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start by reading the WSL plugin loading and runtime entry points; the issue does not name specific files or tests. The proposal requires designing process isolation, lifecycle control, restart behavior, and plugin initialization events. Done would mean agreeing on an architecture that supports those capabilities without restarting the WSL service.
Written by the indexing model from the issue text.
Description
Problem
Currently, a WSL plugin is a DLL directly loaded into the wslservice.exe process when it starts. There is no way to manage the lifecycle of that library other than that, which is quite inconvenient.
Indeed, when installing the file at a certain path and then registering it in the right Registry key, then it is not possible to instruct the WSL runtime to load it immediately. Similarly, when updating it, there is no way to instruct the runtime to unload it and load the new one. This makes it hard to handle the basics of software integration.
Also, having the library directly loaded into a central process poses a few risks that cannot be managed externally:
- if some of its code crashes, then the WSL service crashes as well;
- if it gets stuck, then it is not possible to "unstick" it by for example killing it without actually killing the WSL service process;
- potentially-vulnerable code gets brought into the WSL service process, thus enabling some attack surface;
- ...
Solution
The ideal would be to move plugins into processes, one per plugin, dedicated to handling their execution with respect to the global runtime that would communicate with them. This would be effectively similar to COM servers in spirit. Some control over these service-like processes would be nice too.
This way, if a crash occurs in a plugin, then only its dedicated runtime process would crash, thus improving safety. Then, upon such an event, the global WSL runtime could detect that this process died and automatically restart it. Also, it would enable managing plugins externally: it would become possible to just stop a plugin process, update its library and instruct the runtime to load it again without restarting the entire WSL service.
Upon a load, it would be nice to also add some kind of event the plugin could react to in order to be able to call the API and perform any initialization/update of what it performs in the Linux space. Alternatively, an already-existing event or series of events recorded until load time could be fired at the newly-loaded plugin to achieve the same end result.
Alternatives
- Just some control over the load and unload of the plugins, but I'm not sure if that's really possible with loader APIs.
- Just restarting the WSL service upon installing or updating a plugin, but that is extremely aggressive and may very well result in data loss, especially considering how WSL2 and WSLG are used mostly interactively by end users.
- Dominant language
- C++
- Stars
- 34.4k
- Forks
- 1.9k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 166
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/WSL
-
feature wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/WSL#42306 · 3 comments ·
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/WSL#42114 · 3 comments ·
Maintainers usually reply within 1 day
-
feature kernel wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/WSL#41107 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
feature kernel
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/WSL#41054 · 9 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
feature GPU
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
microsoft/WSL#13592 · 4 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nextcloud/passman-android#214 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64May be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 87/100
esphome/esphome#22892 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day
-
arch-based hyprland
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
noctalia-dev/noctalia#5423 ·
Maintainers usually reply within 1 day