"After nearly one year of development, I'm pleased to announce our version 3.0.1 release of the Cosmopolitan library. The project is an entirely new animal. For starters, Mozilla sponsored our work as part of their MIECO program. Google also awarded me an open source peer bonus for my work on Cosmopolitan, which is a rare honor"
I caught up with some of the latest developments in the ecosystem around Justine Tunney's cosmopolitan and Actually Portable Executable (APE) projects this week.
They are absolutely fascinating.
An Actually Portable Executable is a wildly clever hack.
It's a single binary file which can run as an executable on multiple platforms - on x86-64 Linux, macOS, Windows and various BSDs, and for ARM-64 on Linux and macOS too (macOS ARM-64 is a recent addition).
Pretty much anything written in standard C can be turned into one of these things, using the cosmocc compiler something like this:
./configure CC=cosmocc
make
make install
cosmocc -o executable.com hello.c
Then run ./executable.com on any of the above platforms to run the program!