The work in TFA describes patches to make the Linux kernel communicate with the hypervisor (sharing information like used memory pages). In my book that's pretty sophisticated.
EDIT: The work appears to be available on Github https://github.com/microsoft/WSL2-Linux-Kernel/commits/linux...
Also, Windows has decent X11 servers that work well with retina displays, which can't be said of XQuartz.
Ack on XQuartz being crap (thought it does have Retina support these days, at least for non-rootless mode), but this is not really a problem of the VM.
Whoops, typo. Windows programs from Linux, I'll fix that.
You can mount other host filesystems from inside the VM in any hypervisor I know of.
In most hypervisors you can't do a
notepad.exe foo.txt
or TextEdit.app foo.txt
for that matter in a Linux VM,Isn't that just a binary loader, like you can do with wine/qemu on any Linux? Surely it's mostly just proxying the pipes, replicating the working directory, and maybe keeping some of the environment variables. The filesystem integration seems like the trickiest part of that altogether.
Example: I type code ./somefolder in WSL and it opens VSCode on Windows, editing the folder I specified.
Edit: danieldk replied just before me, but I think my answer adds to that instead of just duplicating danieldks.
Also danieldks answer highlights something important: it doesn't seem to be just magic shell wrappers (or if it is they are truly magic).
VSCode is somewhat special when it comes to editing files, Notepad is not.
Many times in WSL2 I've had a git rebase fail because it couldn't overwrite existing files, and every time it could be fixed by just running git rebase --continue. The actual problem seems to be that WSL2 system calls return before the NTFS operation completes, so quick successions of create-after-unlink or write-after-rename can have unexpected results.
For this reason I still keep a WSL1 environment, it doesn't have the same issues (and doesn't appear to be any slower for filesystem operations).
It's definitely a great deal slower for filesystem operations inside the Linux system. Filesystem operations outside the VM's disk image go through 9p, which gives you basically the same performance for both.
AFAIK, there's no way to achieve anything like this on macOS.
But in WSL2 the whole thing runs in a Hyper-V VM, with a customised Linux kernel (available via http://linux.microsoft.com) to help with interoperability between WSL and Windows.
It's also very paravirtualized, which is why HyperV enlightenments are required for WSL2 guest.