Skip to content

425KB hello world — why your binary doesn't need a runtime

bash
$ wyn build hello.wyn
$ ls -lh hello
-rwxr-xr-x  1 ao  staff  425K Feb 25 01:00 hello
$ file hello
hello: Mach-O 64-bit executable arm64

425 kilobytes. A native binary. No runtime, no VM, no interpreter. Just machine code and the Wyn standard library.

For comparison:

LanguageHello world binaryRuntime required
C33 KBNo
Wyn425 KBNo
Rust300 KBNo
Go1.8 MBNo
Java0 KB (needs JVM)~200 MB JRE
Python0 KB (needs interpreter)~30 MB
Node.js0 KB (needs runtime)~80 MB

Wyn compiles to C, then to native code. The binary includes the full standard library (networking, file I/O, concurrency, ARC) — that's where the 425KB comes from. A raw C hello world is 33KB. The extra ~400KB is the Wyn runtime linked in statically.

Why this matters

Deployment is scp. Copy the binary to a server. Run it. There's no apt install python3 or nvm install 18 or "which version of the JRE do you have?" The binary runs.

Containers are optional. You can use Docker if you want (we ship a multi-stage Dockerfile). But you don't need it. A 425KB binary doesn't need a 200MB base image.

Cold start is instant. Lambda functions, CLI tools, cron jobs — anything that starts and stops frequently benefits from a binary that loads in microseconds, not a runtime that initializes in hundreds of milliseconds.

How it works

Wyn compiles your source code to C, then invokes a C compiler (TCC for development, system cc for release builds) to produce a native binary.

hello.wyn → Wyn compiler → hello.c → cc → hello (native binary)

The standard library is linked in statically. The linker doesn't currently strip unused functions, which is why even hello world includes the full runtime. This is a known area for improvement — dead code elimination would bring the binary closer to C's 33KB.

There's no garbage collector. Memory is managed with ARC (automatic reference counting) with defer for cleanup patterns.

Deploy on Friday

From the Wyn flight rules:

Deploy on Friday. Your binary doesn't have dependencies.

When your deployment is "copy a 425KB file," there's nothing to go wrong. No dependency resolution, no version conflicts, no "works on my machine." The binary is the artifact.

bash
$ wyn build server.wyn
$ scp server prod:/usr/local/bin/
$ ssh prod "systemctl restart myapp"

Three commands. Friday afternoon. Sleep well.

MIT License