A hello world program built with marmot weighs 201 KB. The same program built with Google's own Go toolchain weighs 1.83 MB, about nine times as much. That is the headline number on the marmot project's site, which pitches a new compiler for the Go language built on MLIR and LLVM, the compiler infrastructure behind languages such as Rust and Swift.
The promise is blunt: keep your Go code and your go.mod file, swap the compiler, and get smaller, faster native programs plus error messages that show you the fix.
The numbers, side by side
The project measured everything on an Apple M3 Pro laptop and says it checks every test program's output against standard Go. Its benchmark summary lists:
- Tiny binaries: 201 KB against 1.83 MB for a println hello world, and 698 KB against 2.43 MB when the program uses fmt.Println, roughly three and a half times smaller.
- Run time: across 45 programs in release mode, a geometric mean of 1.54 times faster than Go, with 37 programs quicker and 8 slower.
- Build speed: a first build of marmot's own 325 packages took 4.40 to 4.57 seconds against 6.14 to 6.18 seconds for go build, and a rebuild with nothing changed took 0.05 seconds against 0.15.
Part of the size gap comes from how Go works. The standard gc linker produces statically linked binaries by default, so every Go binary carries the Go runtime inside it. Marmot leans on whole-program optimization in its release builds to strip that down.
How it is built
Marmot is not a rewrite of the language. It keeps the parts of the official toolchain that define Go, including the type checker, the SSA builder and Go's own standard library, and replaces only the code generator. A small "go dialect" inside MLIR keeps Go's meaning around long enough to skip bounds checks, leave objects on the stack rather than the heap, and dispatch interface calls without a lookup. The site's own example shows a simple loop over a slice turning into arm64 vector instructions that add four numbers at a time.
The error messages are the cheeky part. The name is a nod to the animal: "Marmots stand guard and whistle when something is wrong," the site says. Each of marmot's 44 error codes is documented, errors mark the exact span of broken code, and a marmot fix command applies the suggested repair. When a coding agent is driving, errors come out as JSON, and a built-in mcp command serves build, run, test and fix to AI tools directly.
The catch
The project says plainly that marmot is experimental. It compiles real Go programs, including itself, "but it is not ready for production." That matters for a language Wikipedia notes was designed at Google in 2007 by Robert Griesemer, Rob Pike and Ken Thompson and now runs tools like Docker and Kubernetes.
Compiler projects have a habit of turning up on Badiyaa. We covered the borland-reborn project that rebuilt Borland C++ 2.0's compiler byte for byte and how Turbo Pascal 3.02 squeezed a compiler and editor into 39,731 bytes, a reminder that small binaries have always impressed programmers.
Sources
- marmot: a Go compiler built on MLIR and LLVM, marmot project, 2026
- Go (programming language), Wikipedia, 2026
Image: Giles Laurent, CC BY-SA 4.0 via Wikimedia Commons
This article was produced with AI assistance and reviewed by our Editorial Desk. How we work.




