I haven't used Windows in quite some time, but I believe they are quite different. WSL is more like a very basic version of Wine in that it implements Linux system calls and can execute ELF binaries, and as such requires you to install a host OS for libc and any other libraries you want. Cygwin is more like Winelib in that it provides a custom libc implementation and toolchain that are natively compiled, and as such requires you to rebuild your applications.
My understanding of WSL is that Linux software runs natively on Windows by virtue of a compatibility layer. Eg. if there is a fork() in my code it will be translated into CreateProcess() or something like that.
I have always been curious on how WSL differs to coLinux or andLinux ( http://www.andlinux.org/ )
About 10/15 years ago I used andLinux to have a Linux shell and other apps inside Windows. It was really good and it seems ahead of its time, as it was not virtualized.
Wine is a lot broader in scope than WSL, while Microsoft is fine with implementing a kernel-level ABI and then shipping a download for an Ubuntu userspace, Wine cannot ship any official Windows components. They had to re-implement every important DLL from scratch in addition to the ABI.
I can see why you would think that, but there is a reason that many think the opposite. Wine is obviously less compatible than WSL, but it is also a much more ambitious project. For WSL to work, it "only" has to implement the kernel translation layer and then run the various userspace tools that Linux does (GNU tools, Gnome, etc).
For Wine to implement even enough to run Notepad, Wine needs a reimplementation of huge portions of userspace. Of course, this also means it is a little bit of an Apples to Oranges comparison.
Perhaps you're right, maybe WSL can do all the job nicely so maybe there is little if any point in developing cygwin. I have never tried it to be honest. I just prefer Windows 7 and loosely-integrated solutions - a 3rd-party Linux in a box feels better than a Microsoft Linux in the Windows kernel (yet just using a VM doesn't feel great for performance reasons and beacuse of not rally seamless file system integration).
I haven't used Windows in quite some time, but I believe they are quite different. WSL is more like a very basic version of Wine in that it implements Linux system calls and can execute ELF binaries, and as such requires you to install a host OS for libc and any other libraries you want. Cygwin is more like Winelib in that it provides a custom libc implementation and toolchain that are natively compiled, and as such requires you to rebuild your applications.
My understanding of WSL is that Linux software runs natively on Windows by virtue of a compatibility layer. Eg. if there is a fork() in my code it will be translated into CreateProcess() or something like that.
Right, so like what Wine does. (Remember: Wine Is Not an Emulator.)
Correct. It's an interesting architecture, if you're interested in reading more:
https://blogs.msdn.microsoft.com/wsl/2016/04/22/windows-subs...
I have always been curious on how WSL differs to coLinux or andLinux ( http://www.andlinux.org/ )
About 10/15 years ago I used andLinux to have a Linux shell and other apps inside Windows. It was really good and it seems ahead of its time, as it was not virtualized.
WSL is actually backwards analogue of WINE, also described as ENIW.
Emulator Not Is Wine? ;)
1 reply →
Wine seems basic and immature in comparison to WSL not the other way.
Wine is a lot broader in scope than WSL, while Microsoft is fine with implementing a kernel-level ABI and then shipping a download for an Ubuntu userspace, Wine cannot ship any official Windows components. They had to re-implement every important DLL from scratch in addition to the ABI.
I can see why you would think that, but there is a reason that many think the opposite. Wine is obviously less compatible than WSL, but it is also a much more ambitious project. For WSL to work, it "only" has to implement the kernel translation layer and then run the various userspace tools that Linux does (GNU tools, Gnome, etc).
For Wine to implement even enough to run Notepad, Wine needs a reimplementation of huge portions of userspace. Of course, this also means it is a little bit of an Apples to Oranges comparison.
Windows < 10/1809 compatibility, ability to ship standalone applications, force of habit, need for something WSL doesn't support.
Ironically, Cygwin might be closer to "native" than WSL is in some cases.
> need for something WSL doesn't support.
Like what...?
> Ironically, Cygwin might be closer to "native" than WSL is in some cases.
Which cases...?
> Like what...?
SQLite, for one. https://github.com/Microsoft/WSL/issues/2395
Perhaps you're right, maybe WSL can do all the job nicely so maybe there is little if any point in developing cygwin. I have never tried it to be honest. I just prefer Windows 7 and loosely-integrated solutions - a 3rd-party Linux in a box feels better than a Microsoft Linux in the Windows kernel (yet just using a VM doesn't feel great for performance reasons and beacuse of not rally seamless file system integration).