Windows Subsystem for Linux (WSL) works pretty well for making most commandline Linux tools available and working on Windows without modification. However, it gets a little tricky for development, when one wants to
- Build a project using a Linux toolchain that doesn't have a well-supported Windows equivalent (Ruby, Node, etc)
- Edit files using a Windows-based GUI editor such as Visual Studio code.
The problem is that Windows apps cannot modify files inside the virtual lxss filesystem. Directly modifying these files is known to cause all sorts of issues.
Therefore, there seem to be only two suboptimal choices when it comes to using WSL for development:
Store the project under lxss (
/home/foo). The normal toolchain works properly. However, editing is limited to either terminal-based Vim/Emacs or whatever can be run under a janky X server, which is less smooth than native editors running on Windows.
Store the project under the Windows filesystem (
/mnt/c/Users/foo). Now any Windows-based editor can be used for development. However, the Linux-based toolchain is fragile as it's not designed to be used on a "network drive", and can cause problems with file watching or databases.
Is there any way to get the best of both worlds here – that is, to be able to edit using a native Windows application, but still have the Linux toolchain work as it normally would on a local drive?