Recommending WSL for Windows 10

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Recommending WSL for Windows 10

Post by AJ »

Hi All,

I've put a note in the discussion page of GCC Cross-Compiler saying about making WSL the default recommendation for Windows 10 users (rather than MinGW / Cygwin). If I get no objections, I will start updating the page.

WSL has now been out of beta for a while and also includes options other than Ubuntu. The apt-get system works very well and I have always found it (since the start of the beta) faster, more compatible and reliable than Cygwin, which now seems a distant memory for me.

If nobody objects, I will update the Cross-Compiler page to recommend this system and will also add a new page about how to optimise WSL for OS Dev after the cross-compiler has been compiled (stuff which is outside the scope of the basic article).

Cheers,
Adam
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Recommending WSL for Windows 10

Post by iansjack »

Good idea. I'm a big fan of WSL.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Recommending WSL for Windows 10

Post by Korona »

I have never used WSL so I might be completely off here but: I agree that Cygwin should not be recommended as it is basically a giant hack. But what is so bad about MinGW? If gcc builds correctly on MinGW, I see no reason not to recommend it. Maybe just recommend both MinGW and WSL.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Recommending WSL for Windows 10

Post by AJ »

Hi,

Thanks for the feedback so far. I have started creating the very basic supplementary page at http://wiki.osdev.org/User:Aj/WSL with a couple of pointers. I'll soon start work on the GCC Cross-Compiler page.
Korona wrote:But what is so bad about MinGW? If gcc builds correctly on MinGW, I see no reason not to recommend it. Maybe just recommend both MinGW and WSL.
Probably all that's wrong with it is my ignorance :). When I started this kind of development back in 2000 using GCC 2.x, I just got in to Cygwin and always found it integrated better for me. I haven't even tried MinGW since then and am probably unfairly tarring it with the same brush.

Cheers,
Adam
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Recommending WSL for Windows 10

Post by bluemoon »

I suppose cross compiler in docker could be configured in similar manner? (or someone could make an image)
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Recommending WSL for Windows 10

Post by AJ »

Someone is welcome to, but it won't be me :)
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Recommending WSL for Windows 10

Post by FallenAvatar »

I'm also slowly working on a guide for WSl as well.

http://wiki.osdev.org/User:Tjmonk15/WSL_Notes

- Amy
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Recommending WSL for Windows 10

Post by AJ »

Ah - OK.

Sorry I had no idea you were working on similar. Perhaps we could merge parts of the articles?

For one, your package list is much better (although I've deliberately left out items installed by following the default GCC Cross-Compiler article).

The point that stands out as needing some adjustment in your article is that the current version of WSL (only available on the latest Windows 10 build) no longer states "beta" and now you have to install WSL, reboot and then download an actual Linux environment from Windows Store (the default Ubuntu is no longer automatically installed).

However we merge this, I'm certain it will be useful to have something on the wiki!

Cheers,
Adam
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: Recommending WSL for Windows 10

Post by Kazinsal »

I've been using WSL as my OS dev build environment since release and I can confirm it is miles ahead of cygwin and mingw. I've got a couple notes that I can put up on the wiki as well.

IMO now that WSL exists and is usable we should straight up discourage the use of cygwin.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Recommending WSL for Windows 10

Post by AJ »

+1
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: Recommending WSL for Windows 10

Post by Octocontrabass »

Instructions for using MSYS2 may be helpful as well, for those who decided not to upgrade to Windows 10 but would still like a build environment that isn't as horrible as Cygwin. (I would offer to provide them myself, but I don't have time to sit down and write it out.)
LazyKitty
Posts: 5
Joined: Wed Mar 28, 2018 6:33 am

Re: Recommending WSL for Windows 10

Post by LazyKitty »

bluemoon wrote:I suppose cross compiler in docker could be configured in similar manner? (or someone could make an image)
I've made a docker image for this a couple of months ago, since I couldn't seem to get it to work on Cygwin (on my previous attempt).
https://hub.docker.com/r/jdesmedt/cross ... -i686-elf/

Here's also the github link for it, in case someone wants to adapt it for x86_64 or something else. I haven't gotten around to that yet, since I'm still figuring out the basics for x86.
https://github.com/jornedesmedt/crosscompile-i686-elf

It does have some issues when newlines are done with carriage returns.
pat
Member
Member
Posts: 36
Joined: Tue Apr 03, 2018 2:44 pm
Libera.chat IRC: patv

Re: Recommending WSL for Windows 10

Post by pat »

I can definitely vouch for WSL, as that's been my dev environment for the past year. I'd suggest mentioning that you now get a choice of what Linux distro you want, currently you can get Ubuntu, openSUSE, Debian and Kali, with apparently more planned. And you can have multiple independent distros installed. Seeing not just one but multiple Linux distros available for download on the Microsoft Store... that's just weird.
Image is my operating system.

"...not because [it is] easy, but because [it is] hard; because that goal will serve to organize and measure the best of [my] energies and skills..."
thumble
Member
Member
Posts: 29
Joined: Thu May 25, 2017 10:41 pm

Re: Recommending WSL for Windows 10

Post by thumble »

WSL is amazing. I do most of my OS development (along with other stuff like working with other stuff like UNIX sockets, etc.) and it works like a charm, and I have yet to encounter a problem with it. It lets you run Linux binaries without any modification which is also very convenient.
User avatar
prajwal
Member
Member
Posts: 154
Joined: Sat Oct 23, 2004 11:00 pm
Contact:

Re: Recommending WSL for Windows 10

Post by prajwal »

+1
Building on WSL and using CLion https://github.com/prajwal83/upanix
complexity is the core of simplicity
Post Reply