honeybadger

cosmopolitan libc

your build-anywhere run-anywhere c library

How Fat Does a Fat Binary Need To Be?

Cosmopolitan lets you build executables that run natively on seven operating systems. One of the first questions C/C++ developers ask is how much bloat does that entail? Is the Cosmopolitan Runtime lean and mean like Go's 2mB Hello World executables? Or is it a monster like Electron or those hundred megabyte OpenJDK shell scripts.

The answer is it takes about 12kB. That's how big a statically-linked executable needs to be to run natively without dependencies on Linux, Mac, Windows, FreeBSD, OpenBSD, NetBSD, and BIOS. Cosmopolitan is designed to let you build such programs. This page will demonstrate why the portability benefits Cosmopolitan provides have negligible performance impact and therefore only serve to save time while ensuring your work can reach a broader audience.

The form below lets you build and visualize hello world programs with a customized support vector. It will show you exactly what goes into an αcτµαlly pδrταblε εxεcµταblε that lets it integrate with so many systems. Since seeing is believing, the hope is that you'll choose to trust Cosmopolitan as your POSIX-comforming systems abstraction.

build me a program...




that runs on...








show me...




output

life.com (12kB)

config

make o/tiny/examples/life.com MODE=tiny CPPFLAGS=-DSUPPORT_VECTOR=0b1111111

hoo