>_ hackerrepos search repos…

← top repos

jart/cosmopolitan

build-once run-anywhere c library

▲ 14 hackers recommend C ★ 21k ISC bioscontainersdarwinefifreebsdlibc

Recommended between 2025-09-07 and 2026-10-11. Last pushed 2026-10-20.

▲ 14 recommend · ▼ 0 criticisms

What hackers say

“It may be time to revisit cosmopolitan ( https://github.com/jart/cosmopolitan ) and redbean”

— simpaticoder, 2026-10-11 · original comment on Hacker News ↗

show original comment

It may be time to revisit cosmopolitan ( https://github.com/jart/cosmopolitan ) and redbean (redbean.dev - although the tls certs are expired and it seems scrubbed off of github).

“For command-line programs, you might try something like Cosmopoliton[2] instead.”

— jasomill, 2026-08-12 · original comment on Hacker News ↗

show original comment

And you can use Wine or Crossover to run your app on the Mac. Better yet, build it for Windows 95, and it'll not only run under Windows, Linux, and macOS, but you can even package it to run in a browser[1]. For command-line programs, you might try something like Cosmopoliton[2] instead. [1] https://www.pcjs.org/software/pcx86/sys/windows/win95/4.00.950/ [2] https://github.com/jart/cosmopolitan

“embedding it in a thin C program and building that with https://github.com/jart/cosmopolitan would be a pretty go-like experience, I'd think.”

— zdragnar, 2026-06-25 · original comment on Hacker News ↗

show original comment

There's a bunch of options from a Google search, but embedding it in a thin C program and building that with https://github.com/jart/cosmopolitan would be a pretty go-like experience, I'd think.

“to make a binary that runs in many places including bare metal.”

— yjftsjthsd-h, 2026-06-15 · original comment on Hacker News ↗

show original comment

…t or run a simple program, I belive DOS without a memory manager would be even faster. Or just make your code boot directly. It's not hard to make a .efi, or use https://github.com/jart/cosmopolitan to make a binary that runs in many places including bare metal.

“it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary which runs anywhere.”

— soulofmischief, 2026-06-14 · original comment on Hacker News ↗

show original comment

Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary which runs anywhere. Would be fun to be able to pass around self-executable website archives. https://github.com/jart/cosmopolitan https://justine.lol/cosmopolitan/index.html https://redbean.dev (Certificates just expired for justine's website, just ignore the warning.)

“make sure to check out the portable C library used to create it, which is also fascinating”

— arcanemachiner, 2026-06-06 · original comment on Hacker News ↗

show original comment

You just helped to dredge up a memory, which brought me back to this fascinating project: https://redbean.dev If this piques your interest, make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan

“It looks like this may be a way to actually accomplish that”

— buu700, 2026-05-17 · original comment on Hacker News ↗

show original comment

Assuming that's the primary value prop, they should go all the way and distribute it as a single cross-OS/arch fat binary. It looks like this may be a way to actually accomplish that: https://github.com/jart/cosmopolitan .

“The power move would have been Cosmopolitan, or a package similar to it.”

— observationist, 2026-03-04 · original comment on Hacker News ↗

show original comment

The power move would have been Cosmopolitan, or a package similar to it. https://github.com/jart/cosmopolitan Cosmopolitan can be used to bundle up any gui package, and your code, and a team of professional software devs should be able to cope with it just fine. You end up with a native executable with a slightly bigger package to ship, since it's carrying executables for various platforms, but you'd effectively have the same code and behavior everywhere. A few extra megabytes, instead of whatever the hell electron is doing. They could also use Java, or even one of the electron type clones that attempt to be better, like Tauri. The point isn't that electron is so awful. It's that the comp…

“the core benefit proposition of Cosmopolitan is indeed a platform-agnostic, statically-linked C standard”

— Rochus, 2026-01-26 · original comment on Hacker News ↗

show original comment

…through the marketing "magic" to find the main engineering value; stripping away the "polyglot" shell-script hacks and the "Actually Portable Executable" container (which are undoubtedly innovative), the core benefit proposition of Cosmopolitan is indeed a platform-agnostic, statically-linked C standard (plus some Posix) library that performs runtime system call translation, so to say "the Musl we have been waiting for".

“that allows a compile once execute anywhere style type of C++ binary”

— alas44, 2026-01-26 · original comment on Hacker News ↗

show original comment

There is this project "actually portable executable"/cosmopolitan libc https://github.com/jart/cosmopolitan that allows a compile once execute anywhere style type of C++ binary

Badge for your README

hackers recommend badge
[![hackers recommend](https://hackerrepos.org/badge/jart/cosmopolitan.svg)](https://hackerrepos.org/repo/jart/cosmopolitan)