Compiles 'hello-world.c' into a binary 'hello-world.com' which can be executed in linux, mac, windows, FreeBSD, OpenBSD, you can even boot it on bare metal!
This repository builds a docker container with Cosmopolitan Libc from
And the 'hello-world.c' from
And puts the executable in a docker-container called
Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.
% ./hello-world.com
hello world
$ ./hello-world.com
hello world
$ docker run --rm marcelmaatkamp/osmopolitan-hello-world
hello world
If you want to change the source code, the docker-container or want to extract the binary, use the docker-compose
$ docker-compose up --build
The executable will be in 'data/'
Content type
Image
Digest
Size
185.7 kB
Last updated
over 5 years ago
docker pull marcelmaatkamp/cosmopolitan-hello-world