Analysis updated 2026-06-21
Ship a C command-line tool as a single binary that works on Linux, macOS, and Windows without separate per-platform builds.
Port an existing autotools C project to all major operating systems by compiling with the cosmocc wrapper instead of a standard compiler.
Debug a cross-platform C program using built-in runtime flags for system call and function call tracing without installing extra tools.
| jart/cosmopolitan | postgres/postgres | allinurl/goaccess | |
|---|---|---|---|
| Stars | 20,798 | 20,828 | 20,514 |
| Language | C | C | C |
| Setup difficulty | hard | hard | moderate |
| Complexity | 4/5 | 5/5 | 2/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires x86-64 hardware and using the cosmocc compiler wrapper instead of a standard C compiler, the APE binary format has a learning curve.
Cosmopolitan Libc is a C library that lets you compile a C or C++ program once and have the resulting binary run natively on Linux, macOS, Windows, FreeBSD, OpenBSD, NetBSD, and even BIOS without needing a virtual machine or interpreter. It achieves this by configuring standard compilers (GCC and Clang) to output a special file format called an Actually Portable Executable (APE), a POSIX-approved polyglot format that each operating system can understand and run directly. The key value proposition is eliminating the "build once per target platform" problem. Normally, if you want a C program to run on both Linux and Windows, you need separate build toolchains and outputs for each. Cosmopolitan produces a single binary that works everywhere. The project ships its own compiler wrapper called cosmocc, which developers use in place of a standard C compiler. Existing open-source projects that use the autotools build system can often be compiled with Cosmopolitan with minimal changes. Built-in debugging aids include --strace (logs system calls) and --ftrace (logs function call traces) flags that any Cosmopolitan program can accept at runtime. The project supports x86-64 hardware and is crowdfunded through GitHub Sponsors and Patreon.
Cosmopolitan Libc lets you compile a C or C++ program once and run the resulting binary natively on Linux, macOS, Windows, FreeBSD, OpenBSD, NetBSD, and BIOS, no virtual machine or per-platform build toolchain needed. It works by producing a special Actually Portable Executable format using standard GCC or Clang.
Mainly C. The stack also includes C, C++, GCC.
The explanation does not specify a license.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.