Skip to content

Built with Milo

Real programs written in Milo. Every one is a single .milo file. Clone the repo and run or build any of them yourself with the ./milo wrapper. They double as integration tests for the standard library.

What do you want to build today?

Pick what you have in mind. Each row jumps to real, runnable examples further down this page, and to the docs that teach the language features they lean on. New to Milo? Start with the Language Tour and the Playground — no install needed.

I want to build…See it workingLearn the pieces
A game or console emulatorEmulators, graphics demosOwnership, Concurrency, FFI (SDL)
A web server or APIServers & network appsError handling, Concurrency, Get started
A command-line toolCLI toolsQuickstart, Strings, Collections
A terminal app (TUI)Terminal & graphics appsConcurrency: green tasks & Select
A debugger or dev toolDebugger: hades, java-dapFFI, Modules
A language or interpreterData & interpreters, the compiler itselfEnums & pattern matching, Ownership
Low-level / embeddedflightControllerSafety, FFI

Emulators: desktop and browser

Three retro-console cores. Same Milo source runs two ways: native binary on desktop (SDL video/audio/input) or JavaScript in the browser via milo emit-js. No plugins. Drop a ROM and play.

NES

Cycle-stepped 6502, PPU, and APU with DMC audio and multiple mappers. Ships six free homebrew games playable in one click: Blade Buster, Battle Kid, Super PakPak, Sir Ababol, Lawn Mower, Mad Wizard. Drag in your own .nes ROM to play anything else.

Super Mario Bros. 3 running on the Milo NES emulator

Genesis / Mega Drive

Motorola 68000 + Z80 dual-CPU core with the VDP graphics processor and FM/PSG audio. Preset homebrew: Headship, Astro Perdido, Gravity Pig, Dragon's Castle. Accepts .md / .bin / .gen / .smd ROMs.

Sonic the Hedgehog running on the Milo Genesis emulator

SNES

65C816 CPU plus the SNES PPU, including a Super FX (GSU) coprocessor core. Plays Super Mario World and Donkey Kong Country; Star Fox boots with GSU-rendered 3D. Load an .sfc / .smc ROM.

Super Mario World running on the Milo SNES emulator

All three run natively too: examples/emulators/arcade.sh <rom> builds the right core with SDL video, audio, and input. examples/emulators/retro/ turns them into a Raspberry Pi couch console with a gamepad-driven menu.

Debugger

hades

hades web UI stopped at a breakpoint inside classify(), showing the source view, call stack, locals, and a live lldb terminal

A web + AI interface for any DAP debugger (lldb-dap, debugpy), written in Milo. One binary, two subcommands: hades web serves a React + Monaco + xterm.js debugging UI from a Milo HTTP/WebSocket server: breakpoints, stepping, call stacks, expandable locals, watch expressions, an ARM64/x86 disassembly pane, and a real PTY terminal you can type into while your program runs. hades mcp exposes the same session to an AI over MCP: both you and the model see and drive the same debuggee. Debugs Milo binaries too; the compiler emits standard DWARF.

java-dap

A standalone Debug Adapter Protocol server for the JVM, written in Milo. No Eclipse, no jdt.ls, no JVM-side code: the whole adapter is a DAP-to-JDWP protocol translator in about 1300 lines. Works with any DAP client, and hades finds it automatically, so you can debug Java the same way you debug Milo.

Terminal & graphics apps

TUIs in examples/terminal/ and examples/graphics/, built on the standard library's terminal, PTY, SDL, and green-thread APIs.

ProgramWhat it is
tetrisEvent-driven terminal Tetris; one green task parked on a Select, no polling
sysmonhtop-style live system monitor
donutThe classic spinning 3D torus, truecolor-shaded
plasmaFull-screen truecolor animation; doubles as a render-throughput benchmark
aquariumTruecolor pixel aquarium: fish, bubbles, swaying seaweed
chihuahuaDVD-logo-style bouncing screensaver with a shaded pixel-art sprite
splitPtyTwo commands side-by-side in real PTYs; a mini tmux
flightControllerSingle-axis PID altitude controller with an interactive TUI
menuFullscreen SDL retro-console front-end with a gamepad/keyboard ROM picker

Servers & network apps

ProgramWhat it is
termpairShare your terminal in the browser: WebSocket relay with end-to-end AES encryption, client and server both in Milo
weatherweather.gov frontend served from a single static binary
serveStatic file server with directory listing
webserverHTTP server with routing, path params, middleware
httpClientHTTP client for fetching URLs
fetchFetch an HTTP API over TLS and parse the JSON response

Data & interpreters

ProgramWhat it is
milojsA JavaScript engine in Milo: parser, evaluator, mark-sweep GC. Runs express
kvstorePage-based key-value store with cursors, in the sled/buffer-pool style
minilangTree-walking interpreter for a small expression language

The language, feeding itself

ProgramWhat it is
src-miloThe Milo compiler, in Milo. Self-hosting: it compiles itself, and the result is identical every time
smtSolveThe SMT solver behind milo prove. Milo's contracts are discharged by a Milo binary
fmtThe Milo source formatter, in Milo

CLI tools

Coreutils-style tools in examples/cli-tools/, each a single .milo file.

ProgramWhat it is
grepPattern search with color, -i / -n / -c / -v
rgripgrep-lite: regex-powered recursive search
jqJSON query tool
treeRecursive directory tree with depth limiting
catFile viewer with line numbers and syntax highlighting
wcLine/word/char counter
hexHex dump viewer with ASCII column
shufShuffle input lines
calcExpression evaluator
parallelRun shell commands in parallel across input lines (fork-based)
timeoutRun a command with a time limit
pkgMilo's own package manager: install and publish packages over git, with a lockfile and GitHub registry

Run these yourself

Every program above is a single .milo file. Clone the repo and run or build any of them with the ./milo wrapper:

bash
./milo run examples/cli-tools/grep.milo -- "hello" myfile.txt
./milo build examples/net/serve.milo -o serve && ./serve

A taste: grep in Milo

milo
from "std/argparse" import { newParser }
from "std/io" import { readFile }

fn main(): i32 {
    var parser = newParser("grep", "search for a string pattern in files")
    parser.addPositional("pattern", "string pattern to search for")
    parser.addPositional("file", "file to search")
    parser.addBool("ignore-case", "i", "case-insensitive search")
    parser.addBool("line-number", "n", "show line numbers")
    parser.addBool("count", "c", "only print count of matching lines")
    let args = parser.parse()

    let pattern = args.getString("pattern")
    let filePath = args.getString("file")

    let content = readFile(filePath)!
    let lines = content.split("\n")

    for line in lines {
        if line.contains(pattern) {
            print(line)
        }
    }
    return 0
}

Prefer no install? Compile and run Milo in your browser on the Playground.