WSL, musl and 32 bit
Jun. 30th, 2026 01:21 pmI've been doing some experiments with WSL. I built an older set of the X11 libraries that doesn't require harfbuzz or libxcb as dependencies. I built them using a musl cross-compiler that creates 32 bit binaries for Linux. I built FLTK with it as well. I'm able to run FLTK GUI applications via WSL. So, the X11 libraries built with musl are capable of talking to WSLg.
It's worth noting that WSL2's 64 bit kernel is capable of running 32 bit ELF binaries. So while many Linux distributions are phasing out 32 bit support, WSL provides a useful platform to continue experimenting with it if desired. Another nice point about WSL is that it can avoid the systemd controversy. While it can be made to work with systemd, it can also use a simple init program or start with /bin/sh if necessary.
It wouldn't be hard to build a WSL distribution at this point. It could also be designed to be completely static or include shared libraries as most Linux distros do. So, a custom distribution would be possible and it would not need to be limited to command line only. It also makes a great testing ground for creating a lightweight Linux distribution that could run natively on older hardware.
WSL has really come a long way from only being able to run command line programs to running X11 apps. The incredible thing is you don't need a specific library such as glibc or specially built Wayland or X11 libraries. It works perfectly well with 32 or 64 bit binaries and a custom built set of X11 libraries. It would make a great environment to custom build a personalized distribution in.
It's worth noting that WSL2's 64 bit kernel is capable of running 32 bit ELF binaries. So while many Linux distributions are phasing out 32 bit support, WSL provides a useful platform to continue experimenting with it if desired. Another nice point about WSL is that it can avoid the systemd controversy. While it can be made to work with systemd, it can also use a simple init program or start with /bin/sh if necessary.
It wouldn't be hard to build a WSL distribution at this point. It could also be designed to be completely static or include shared libraries as most Linux distros do. So, a custom distribution would be possible and it would not need to be limited to command line only. It also makes a great testing ground for creating a lightweight Linux distribution that could run natively on older hardware.
WSL has really come a long way from only being able to run command line programs to running X11 apps. The incredible thing is you don't need a specific library such as glibc or specially built Wayland or X11 libraries. It works perfectly well with 32 or 64 bit binaries and a custom built set of X11 libraries. It would make a great environment to custom build a personalized distribution in.