Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

WSL2 is a VM. WSL1 is Wine in reverse. They run ELF binaries compiled against the Linux ABI. Cygwin/Msys is a Posix compatability layer for PE binaries.


I thought WSL1 implemented Linux's ABI in the NT kernel and uses a Linux userland. Wine reimplements the a Windows userland and emulates NT kernel services in userland. The two do not seem the same, although the intention of running Linux software on Windows is the opposite of the intention of letting UNIX system run Windows applications.


> I thought WSL1 implemented Linux's ABI in the NT kernel

Yeah, I thought that too, and said so in an article. It would be the clean, logical, elegant way to do it and inline with the history of NT.

I got angry denials from several Microsofties on Twitter!

It isn't at all.

WSL1 is an offshoot of the now-cancelled Android runtime for Windows.

They wanted to run Android's JVM/Dalvik apps on Windows Mobile... but discovered more and more native OS calls. So, they ended up implementing 90% of a Linux kernel emulator in userland.

Later, they made it standalone and complete enough to run a real Linux userland on top, and marketed it as a Linux runtime.

It is tragic to me that senior MS execs are now proud of this approach and scolded me for thinking otherwise.

My conclusion is that MS no longer has:

• Any kernel engineers who really understand how NT works deep down;

• Anyone skilled enough to modernise the NT kernel's POSIX personality to be Linux personality;

• Anyone in authority who realises it ought to have these things;

• Nobody left who feels shame at this.


They call them pico processes and have documented them quite well [1]. The pico processes has a userland and kernel component and is quite interesting from a technical perspective.

[1] https://learn.microsoft.com/en-au/archive/blogs/wsl/pico-pro...


That's a byproduct of NT being designed from the start to have subsystems for alternate execution environments and was the path of least resistance. Conversely, it wouldn't be logical to make Wine tightly integrated into the Linux kernel when it had broader portability goals.


Interestingly, they recently pushed ntsync into the Linux kernel specifically for use by wine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: