Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Build-Once Run-Anywhere C lib that runs on Linux, Windows, macOS, BSDs and more (github.com/jart)
2 points by capableweb on May 3, 2022 | hide | past | favorite | 1 comment


A good introduction to how it works (and explains why) is this page: "αcτµαlly pδrταblε εxεcµταblε" - https://justine.lol/ape.html

> I started a project called Cosmopolitan which implements the αcτµαlly pδrταblε εxεcµταblε format. I chose the name because I like the idea of having the freedom to write software without restrictions that transcends traditional boundaries. My goal has been helping C become a build-once run-anywhere language, suitable for greenfield development, while avoiding any assumptions that would prevent software from being shared between tech communities.

> In the above one-liner, we've basically reconfigured the stock compiler on Linux so it outputs binaries that'll run on MacOS, Windows, FreeBSD, OpenBSD, and NetBSD too. They also boot from the BIOS. Please note this is intended for people who don't care about desktop GUIs, and just want stdio and sockets without devops toil.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: