Blog
Release notes for each tagged version of Xo, and notes on its design.
How we built an inference library in Xo that runs faster than MLX
Gemma 4 on Apple's GPU from Xo, with no ML framework: faster than mlx-lm at generating tokens for one conversation on all three models we ran, level on a long bfloat16 prompt, and still behind with many conversations at once. One measuring tool made the difference.
The test floor: why selecting fewer tests did not make our gates faster
Every push to Xo runs a gate. Over two days the LLVM step of that gate averaged 45 minutes, even for a change that selected no test programs at all. How we found the fixed floor, the two costs hiding under it, what we changed, and the daily check that keeps it from coming back.
Hunting a slow heap growth under huge pages
A server with a small, flat live heap grew its resident memory 7 to 10% over an hour on Linux, under Xo's default huge page policy. How we found the two bugs behind it (one hour runs, per-minute heap counters, and turning off one path at a time), the fix that made a second, quieter bug worse, and the rule that came out of it.
Build a todo app with std/ui, then build it again by hand
A step by step tutorial: a shared todo list in Xo with std/ui, where the server and the browser run one update function, from the Model to a wasm client that shows each action before the server answers. Then the same app built the usual way, with hand written HTML, CSS and JavaScript over a JSON API, and measurements of both in Chrome.
Porting Brotli to Xo, and the compiler weaknesses it found
A 20,000 line port of Brotli found two compiler weaknesses that, as far as we know, the standard library's other timing twins had not shown: a register allocator that spilled too early in loops with many live values, and Float32 arithmetic that took a detour through double precision. What we saw, what we tried, the fixes, and the checks we are building so the next one is caught earlier.
Two CPUs, three threads: chasing an HTTP server's tail under a container quota
In a 2 CPU container, Xo's HTTP server had a p99 of 58 ms where Go's was 5. The cause was a thread nobody counted, and CFS throttling stalled every thread for the rest of each 100 ms period. How we found it in /proc, the fix, a monitor that backs off like Go's sysmon, the last throttle we could not remove, and a fair comparison at equal load.
What Xo promises before 1.0, and what it will promise at 1.0
Xo is on 0.x and a minor release may break code. The written policy: every break ships with an xo fix rewrite and a changelog line, deprecations come a release before removal, diagnostic codes keep their meaning, and the 1.0 promise is editions.
Measure before you build: how a REPL question made Xo's tools faster
We asked whether Xo needed a REPL or a resident compiler. Measuring first found two cache bugs that cost most of a compiler rebuild, a lookup server that answers in milliseconds, and an editor that responds a third faster.
An AWS SDK for Xo
An AWS SDK for Xo, generated from the same Smithy models aws-sdk-go-v2 is built from: 435 services, with a hand-written core for signing, credentials, endpoints, six protocols and event streams. How it was built, how big it is next to Go's, how it was tested against AWS's own suites and real AWS, and the Xo bugs it found on the way.
Xo gets a debugger
xo debug is a live debugger built into the xo command: breakpoints, stepping by source line, locals, and Xo's tasks read from the runtime's own records, in a terminal, as JSON for agents, or in VS Code through the Debug Adapter Protocol. What it does, how it is built (in Xo, with its own DWARF reader and its own process control on each OS), how it compares with Delve, and the two bugs it found on the way.
What Go trades for its design vs Xo
Go's runtime and toolchain make deliberate trades: heap headroom for cheap concurrent collection, growable stacks for cheap goroutines, package-level caching for simple builds, fused multiply-add for speed. This post walks through how each one works inside Go 1.26.1, what it costs, what Xo does instead, and the measurements, including the places where Go is faster.
Capping the allocator's cache: how 0.36.0 grew a small program's memory, and how 0.37.0 takes it back
Xo 0.36.0's release benchmarks showed a small program peaking at 1.18 to 1.32 times its 0.35.0 memory. The extra was not live data: it was freed memory the allocator kept for reuse. 0.37.0, the next release, caps that cache at a quarter of the bytes in use, and the same programs now peak below 0.35.0 and below Go.
Measuring through code placement noise
The same machine code can run 38 percent apart depending on where it lands in memory. How Xo measures a change when one build of each side can show a regression that is not there, and why aligning the code did not make the problem go away.
How Xo hunts its own miscompiles, and the /alloc chase that ended in luck
A compiler pass that is wrong gives a correct program a wrong answer with no error. How Xo hunts those on purpose, what it found, and a benchmark regression chase that crossed five suspects and ended at a code placement.
What's new in Xo 0.34: edits build faster than go build
Xo 0.34 compiles your program separately from the standard library, so an edit rebuilds in 70 ms where 0.33 took 231 and go build takes 88. Also: faster starts, a direct scheduler hand-off, faster links, jump padding for Intel's JCC erratum, SHA-3 with the arm64 SHA3 instructions, faster std modules, and the 0.33 testers' fixes.
Edit, build, run: how Xo 0.34 cut the edit loop to a third
An edit in Xo 0.33 rebuilt the whole program, standard library included: 231 ms for a small benchmark, 571 for an HTTP service. Xo 0.34 compiles std once and links it as a store: 70 and 156 ms, faster than go build of the same edit. The design, the measured path, and the optimization strategies we learned on the way.
Adding DeepSeek to the team: two harnesses, guardrails, and a lead
Xo is built by Claude agents. For two days a DeepSeek model worked beside them, first in the Pi coding agent and then in Claude Code, under a guard that blocks the dangerous classes of action, in its own worktree, watched first by an overseer session and then managed directly by the lead. How it was set up, what it got right, where it needed correcting, and what it cost the rest of the team.
Where macOS keeps a program's debug info, and why Xo moved it
What a .dSYM is, why Apple keeps DWARF out of the executable, why Apple's own tools cannot read Go's default debug info, how Linux and Windows do it, and what Xo does since 0.26.0: the DWARF inside the executable, uncompressed.
Correct first, fast later: closing the gap to LLVM
Xo's own arm64 and x86_64 backends started as straightforward code generators and are now within about 10 to 15 percent of LLVM's instruction counts. What changed, how we measure it, and the changes that were wrong.
The playground now runs Xo's own compiler: 2 MB instead of 23.5, and runs in half a second
The Xo playground used to ship Go's compiler and linker to your browser. Now it runs Xo's compiler, built for WebAssembly by its own backend: a 2.13 MB download instead of 23.5 MB, and a run in about half a second instead of about 2.7. How it got there, the stack overflow that nearly stopped it, and what was dropped.
From one Mac to EC2, to CI, and back: where Xo's tests run
Xo's tests started on one Mac, grew onto Graviton machines in EC2, became on-demand GitHub Actions jobs on self-hosted runners, and then came back to the Mac with Docker for Linux and Windows. What each step bought, what it cost, and what Docker still cannot do.
From one session to a team: how the AI agents behind Xo work together
Xo is written by AI agents with a human owner setting direction. In nine days the setup went from one session with a couple of subagents to several peer sessions that assign, report, hold and hand off work to each other. What changed, what broke, and what it bought.
No C left in the runtime: replacing 26,743 lines of C and Mbed TLS with Xo
Three days ago Xo's native runtime was 26,743 lines of C, and TLS came from 206,879 lines of vendored C. Now both are Xo. Why we did it, the intrinsics and seeds it took, the bugs it found, and what is faster and what is still slower.
Malware Blocked: how twelve bytes of Xo's output matched an XProtect rule
macOS refused to open some programs Xo had compiled, calling them malware. The cause was not a signature, a linker bug, or Gatekeeper's mood: one data symbol sat at page offset 0x880, and three arm64 instructions that loaded it matched a byte pattern in Apple's rules. The dead ends, the find, the fix, and a second stall that only looked the same.
From five minutes to under a minute: fast self builds, and seeds instead of a chain
Building Xo's compiler with itself used to take 337 s on a Mac and 42 minutes on x86. Now it takes about a minute, and a fresh machine no longer replays a chain of old compilers. Where the time went, what changed, and what it saves on every build.
We deleted the Go compiler
Xo's original compiler, written in Go, is gone from the repository: about 95,000 lines. What was removed, what stays in Go and why, how we checked nothing broke, and the chicken and egg problem the deletion exposed.
From one Mac to warm machines: how Xo's test setup grew up in three days
Many AI agents, one 24 GB Mac, and a test suite that takes an hour on a big machine. How Xo's testing moved to EC2, what broke on the way, where it landed, and what it saved.
The chicken and the egg: how Xo bootstraps a compiler written in Xo
To build Xo's compiler you need an Xo compiler. Here is how the first one gets made, why we insist that each rebuild produces the same bytes, and what that does and does not prove about trust.
Building Xo in Xo: what worked, and what we would fix
Xo's compiler is written in Xo, and its runtime is moving from C to Xo, mostly written by AI agents. An honest look at what that has been like: the wins, the bugs it found, and the rough edges it exposed in the language and our tooling.
Low-level power for the runtime, not for your code: how Xo and Go draw the line
Xo's runtime is moving from C to Xo, and runtime code needs things ordinary code should not have: wrapping arithmetic, 128 bit multiplies, unchecked loads. Here is how Xo gives those to its standard library and nobody else, and how that compares with Go.
Number text in Xo: moving a piece of the runtime out of C, one measurement at a time
Turning numbers into text and back is now written in Xo on the native backends. Each piece had to come within 5 percent of the C it replaced, on both backends, or stay C. Most pieces beat it; one did not, and it stayed.
Writing our own assembler and linker
On arm64 Macs, the Xo compiler written in Xo now turns its assembly into executables by itself: an assembler whose objects match the system assembler's byte for byte, and a linker that links the compiler to a fixed point with no C toolchain installed.
Measure, don't guess: performance lessons, including the ones that failed
Why the self-hosted Xo compiler ran at half speed, and the guesses, designs, and ports that did not pay off on the way. Every number here, including the disappointing ones, is in a committed results file.
Byte-identical or it didn't happen: how Xo learned to compile itself
Every part of the Xo compiler was ported to Xo by comparing it with the Go implementation, function by function, until the output was the same to the byte. Why we held it to that bar, how the stages went, and the one bug only the self-hosted compiler could expose.
Three test tiers for a compiler that tests itself
The self-hosted compiler's tests grew from minutes to an hour as each stage landed. Splitting them into short, merge, and full tiers brought merges back to about 2.5 minutes. What we gave up, and why it is the right trade.
The SSA builder, written in Xo
The largest piece of the Xo compiler's back half now exists in Xo too, checked function by function against the Go implementation on three backends. How we checked it, what it found, and how fast it is.
A dependency can only do what you let it
We rebuilt 15 supply-chain attack scenarios as malicious Xo dependencies. Xo blocks 10 of them; here is the table, and why the other 5 get through.
A playground with no server
The Xo playground checks, compiles, and runs your code inside your browser tab, with the real Go compiler and linker built for WebAssembly.
Introducing Xo
A small, statically typed language for backends, designed so the compiler catches what AI agents (and people) get wrong.