Skip to content

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

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

32 kilobytes. A native binary. No runtime, no VM, no interpreter. Just machine code.

For comparison:

LanguageHello world binaryRuntime required
Wyn32 KBNo
C33 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 is the program. Nothing else.

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 32KB 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.

Edge deployment works. 32KB fits on embedded devices, runs on minimal VMs, deploys to edge locations where you're paying per-MB of storage.

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 compiled once into a static library (libwyn_rt.a) and linked in. Only the functions you actually use end up in the binary — the linker strips the rest.

There's no garbage collector. Memory is managed with malloc/free, with defer for cleanup patterns. The runtime overhead is essentially zero.

The tradeoff

C transpilation means you need a C compiler on the build machine. On macOS that's Xcode command line tools. On Linux it's gcc or clang. On Windows it's MSVC or MinGW.

For development, Wyn bundles TCC (Tiny C Compiler) so wyn run works out of the box without installing anything. For release builds, wyn build --release uses the system compiler for better optimization.

Debug stack traces point to the generated C code, not your Wyn source. We're working on source maps (it's on the roadmap), but for now, error messages include the Wyn line number in most cases.

Deploy on Friday

From the Wyn flight rules:

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

That's not a joke. When your deployment is "copy a 32KB 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 --release server.wyn
$ scp server prod:/usr/local/bin/
$ ssh prod "systemctl restart myapp"

Three commands. Friday afternoon. Sleep well.

MIT License