While WSL is great, I've always wanted a native POSIX environment for developing on Windows. I wanted one that didn't require specialized DLLs with GNU GPL licenses such as as Cygwin and MSYS do. There are other options available. Midipix provides a POSIX environment for easily porting and developing POSIX compliant applications on Windows. The licensing isn't any more lenient than Cygwin though. It does use the MUSL C library which is a nice feature. There's AT&T's Uwin project which is now available as Open Source: https://github.com/att/uwin The license for the project isn't exactly compatible with GPL software. I've looked into native POSIX shell alternatives to those found in projects like Cygwin and msys. Bash is not easy to port to Windows without Cygwin or msys DLLs to support various functionality. It isn't exactly easy to port to DOS either. Most bash ports to DOS and Windows are older ones. One Windows port that builds successfully on Windows with MinGW32 is: http://win-bash.sourceforge.net/ I investigated the mksh project at one point and even offered to work on a Windows port. They were not in the least bit interested and already had some commercial company looking to create a port to Windows using there own proprietary code to provide a POSIX compatibility layer. So even if their plan was successful, it wouldn't exactly provide a native Windows port anyone could use in their projects. Tcsh has support for Windows. Zsh was also very popular on Windows. Checking the versions of zsh, the latest Windows version I could find that compiled with no issues using MinGW32 was 3.0.8.1: https://github.com/oldfaber/wzsh The zsh project seems to have progressed to a much later version since then. I've also experimented with Swiss which provides a Busybox-like set of tools with a shell. Speaking of Busybox, there is a port of it to Windows which provides an implementation of the ash shell: https://github.com/rmyorston/busybox-w32 Unfortunately, the build system works in such a way that you need to cross-compile it to get anything to build properly. Even after attempting to cross-compile using the source code, I still ended up with a program that crashes on exit. The busybox-w32 executables at the official sites don't seem to have that problem though. So much for being able to reproduce an executable others are distributing just from the source code.

I have several programs that could replace a lot of the core and basic utilities found on POSIX systems. I even have an older version of make patched to work with a shell of my choice rather than requiring Cygwin or msys DLLs or producing a crippled native version of make that can't handle long command lines. I had discussed the option of getting make to work with other shells besides Cygwin or msys with the developers of make at one point. I had sent them a patch for an issue with using make natively on Windows without a shell. The developers weren't interested in Windows support beyond using Cygwin or msys bash shells. I have older versions of GNU autotools patched to run natively and work around the slash versus backslash file delimiter issues. So, I think I could put together a native POSIX environment for Windows that could be used for development with a command line compiler. However, I'm still left with the decision of how to replace the msys bash shell. It would be very nice to avoid Cygwin and msys and not have the limitations on directories that these programs impose. For instance, they assume / and /usr are in the same locations so /bin is the same directory and in the same physical locaton as /usr/bin. A Windows native POSIX shell option would be ideal. The only question is which shell to go with.

Likely Windows shell candidates at this point are older versions of bash, zsh and ash. It would be nice to find some other options or hear from others interested in native Windows development as to what their POSIX shells of choice might be. If anyone else is interested in developing natively on Windows using a POSIX-like environment, feel free to contact me to discuss the situation further, add your suggestions or brainstorm some new ideas: http://www.distasis.com/connect.htm I'd love to be able to put something together similar to the gnuwin32 or unxutils projects but with more up-to-date utilities. It would be great to have input from others looking to create or piece together their own POSIX development environments on Windows.
I've listed some core utilities options besides GNU. I thought I'd share something about what utilities I personally prefer to use. My main requirement in a good set of core utilities is portability. This is rather hard to find. You would think that if a utility was efficient and lightweight, it would be easy to port. However, that's not necessarily so. Many utilities that are designed for efficiency take advantage of features of a particular operating system which makes them harder to port.

At first, I considered starting with sbase which had stated goals similar to what I was looking for, but it didn't have enough features to effectively replace the GNU core utilities when developing and building programs. While newer versions of sbase have added a lot of functionality, they've become much less portable.

My favorite source for inspiration is Minix. Earlier versions provided some interesting and fairly portable versions of a variety of utilites:
https://www.minix-vmd.org/cgi-bin/raw/source/std/1.7.5/src/commands/simple/
Some of the utilities don't have sufficient UTF-8 support or lack some newer functionality found in GNU utilities that makes them fail when attempting to build applications. However, they make a useful starting point.

In some cases, the OBase or BSD utilities do a better job than the older Minix ones and still do that job efficiently. I particularly like the version of patch found on BSD systems. It's an earlier variant of the Free Software Foundation's patch program. Unlike the FSF's version of patch which uses the GNU license, it uses a BSD style license.

For some utilities, I've consulted the POSIX standards ( http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html ) and rewritten them from scratch.

Rather than trying to port utilities such as the Free Software Foundations coreutils, I thought having a lightweight, efficient, highly portable option would be a useful alternative. Many of the FSF developers have little interest in portability making it hard to get later versions of their programs working on non-POSIX systems. I was surprised at how little interest most users have in developing portable alternatives to the core utilities that could be used to build software. Not only was their little interest, some people posted extremely negative comments when anyone suggested creating alternatives to the FSF software. I was also surprised by some of the negative reactions I read about wonderful projects like SBase.

I have a growing collection of public domain, BSD and MIT licensed alternatives to the GNU core utilities. For now, I just use them for my own projects. If you have an interest in portable utilities and tools, would like to see a viable portable alternative to the FSF's GNU coreutils or would like to further discuss related topics in a positive light, feel free to contact me. I'd enjoy talking with other developers and utility users on the topic.

You'll find some added information on my utilities and information on how to discuss the topic further at:
http://www.distasis.com/cpp/lmbld.htm
Most systems (other than BSD based ones) use GNU's core utilities. It's used by most Linux distributions. Cygwin, MinGW and gnuwin32 run ported versions of the GNU applications as well. Even Microsoft's SFU/SUA included some of the GNU utilities. However, the GNU core utilities are typically more bloated and have more feature creep than other versions of standard Unix utility programs. BSD systems have their versions of core utilities. The latest version of Minix has adopted the BSD utilities. They tend to be less bloated than the GNU versions, but are still more bloated than other options out there. The BSD utilities also tend toward adding new features similar to but not to the same extent as the GNU utilities. Also, some of their utilities aren't as well optimized as the GNU versions. Busybox seems like the most viable option for a lightweight but still comprehensive version of core utilities. I'm currently using it on my Debian system instead of the GNU core utilities. Toybox is a similar alternative to Busybox. It has a better license option than Busybox, but it's lacking some features and tools that Busybox has.

Here are some links to core utility collections:

Earlier Minix alternatives
http://www.minix-vmd.org/cgi-bin/raw/source/std/1.7.5/src/commands/simple/
Earlier versions of Minix put together an interesting collection of lightweight utilities from various sources.

Busybox
https://busybox.net/
Windows ports of Busybox:
https://frippery.org/busybox/
https://github.com/rmyorston/busybox-w32
https://github.com/realthunder/busybox-w32

Toybox
http://landley.net/toybox/

Heirloom Project
http://heirloom.sourceforge.net/
Based on traditional implementations of standard Unix utilities. Not very portable to non-POSIX systems. Not as bloated as GNU or BSD core utilities.

OBase
https://github.com/chneukirchen/obase
Port of OpenBSD userland to Linux.

SBase
http://git.suckless.org/sbase
This started out as a discussion on one of the suckless.org mailing lists of how to write efficient core utilites that weren't all part of one executable like Busybox or Toybox. Some good examples were posted and the project was started. Then project development was quiet for a while. The project became active again and one of the main goals besides efficiency was UTF-8/internationalization support. Looks like they've borrowed some UTF-8 support concepts (such as Runes) from Plan 9. It's not designed to be portable to non-POSIX systems. However, it does look like they've covered replacing most of the basic core utilities with lightweight, efficient versions.

Other alternatives:
https://github.com/jbruchon/elks/tree/master/elkscmd
https://github.com/EtchedPixels/FUZIX/tree/master/Applications
https://github.com/Orc/bin
https://github.com/eltanin-os/utilchest
https://github.com/eltanin-os/cbase
https://github.com/rofl0r/hardcore-utils
http://git.musl-libc.org/cgit/noxcuse/tree/
https://github.com/pikhq/pikhq-coreutils
http://www.fefe.de/embutils/
http://skarnet.org/software/s6-portable-utils/
https://github.com/dimkr/lazy-utils
https://github.com/arsv/minitools
http://git.suckless.org/ubase
https://github.com/dcantrell/bsdutils
https://github.com/cheusov/nbase
https://github.com/rswier/swieros
https://github.com/minoca/swiss
https://github.com/mentos-team/MentOS/tree/master/programs
This post includes a list of resources for building applications and libraries for Windows using MinGW or similar projects.


Just wanted to note some of the native Windows porting projects I've worked on before I list some of the other projects out there. I've compiled the X server code and built a X server on Windows (similar to the Xming X server but with all my own patches). I'm looking into porting msh to Windows and other platforms (including patches for better handling of internationalization/UTF-8 character codes). I'm working on porting various core utilities based on Minix, BSD and custom implementations. I have patches and build scripts for several Open Source libraries and programs. See http://www.distasis.com/cpp/lmbld.htm for further details and a link to some of the scripts and patches. I work with regex and fnmatch libraries based on MIT licensed code from musl. musl uses regex code from the BSD licensed tre library. I also work with a BSD gettext implementation based on code put together for PostgreSQL. The libiconv and iconv implementations I use are written from scratch using custom UTF-8/internationalization code. I also have my own custom implementations of libmman, libdl and pthreads as well as other libraries I use to help with porting applications.


Places to download builds of various Open Source software and libraries for Windows and MinGW:

http://gnuwin32.sourceforge.net/
Many of the GNU libraries and programs patched and recompiled for MinGW.

http://devpaks.org/
Devpaks repository Libraries for the Dev-C++ compiler which uses MinGW. Could also be used without Dev-C++. Files should be standard tar.bz2 files renamed with .devpak extension.

http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory/noarch/
OpenSuse Windows Packages has windows packages cross-compiled using MinGW on OpenSuse and the OpenSuse Build System (OBS).

https://sourceforge.net/projects/ezwinports/
ezwinports has ports of Unix and GNU software to MS-Windows.

https://sourceforge.net/projects/mingwrep/
MinGW packages repository

https://sourceforge.net/projects/takeoffgw/
TakeoffGW - Cygwin style package manager and native Windows packages built with the OpenSUSE Build Service.


Patches and build scripts to build Open Source software for Windows:

https://github.com/Alexpux/mingw-builds
https://github.com/mxe/mxe


MSYS and Cygwin alternatives:

http://midipix.org/
Alternative to MinGW and Cygwin and build scripts for various Open Source tools:

https://github.com/bmatzelle/gow/wiki
GNU on Windows - lightweight alternative to Cygwin. Native Win32 programs.

Busybox port for Windows:
https://github.com/pclouds/busybox-w32
Lightweight versions of core utilities.

Busybox-w32 fork:
https://frippery.org/busybox/

http://unxutils.sourceforge.net/
UnxUtils - Native Win32 ports of core utilities.

https://github.com/rubenvb/UnixToolsForWindows
Unix Tools for Windows - Native Windows implementations emulating core utilities written in C++.

http://sourceforge.net/projects/win-bash/
Native Win32 port of an older version of bash.

https://steve.fi/Software/bash/
GNU Bash for Windows

https://sourceforge.net/projects/zsh-nt/?source=directory
WinZsh - Z shell for Windows

http://www.straightrunning.com/XmingNotes/
Xming X Server - Windows native X server


Open Source libraries patched for Windows:

http://waterlan.home.xs4all.nl/libintl.html
Relocatable libintl for MinGW.

https://github.com/dlfcn-win32/dlfcn-win32
POSIX dynamic runtime library loading (libdl) compatibility routines.

https://code.google.com/archive/p/mman-win32/
POSIX mmap functionality.

http://synesis.com.au/software/unixem.html
Various POSIX functions implemented for Windows.

https://github.com/rprichard/winpty
Winpty - provides and interface similar to a Unix pty-master for communicating with Windows console programs.


Pthreads and C/C++ 11 threads compatibility patches and implementations:

https://sourceware.org/pthreads-win32/
pthreads-win32 - Red Hat's POSIX thread library for Win32.

http://jmhartsoftware.com/Pthreads_Emulation.html
Simplified Pthread Emulation with Macros - Minimal pthread emulation.

https://tinycthread.github.io/
TinyCThread - C11 threads implementation

https://github.com/jtsiomb/c11threads
c11threads - GNU compatibility headers for C11 thread support

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 11:15 am
Powered by Dreamwidth Studios