Down to
the marrow.
Marrow is a small, explicit systems language that compiles straight to native code through QBE. No garbage collector. No hidden runtime. Memory is owned and checked at compile time — if your program allocates, it's because you told it to.
@import("std/std.mw")
@export fn main() {
println("Hello from Marrow !");
}$ marrow hello.mw
Compilation successful! Executable created at: hello
$ ./hello
Hello from Marrow !What you write is what runs.
No hidden runtime
No garbage collector, no implicit allocations, no hidden control flow. Every allocation traces back to a function you called.
C-friendly, libc-free
@extern calls any C function directly, yet the standard library itself needs no libc: it talks to the OS through a small platform layer.
QBE-backed codegen
A small compiler, written in Marrow, emits textual QBE IL, then shells out to qbe and your system C compiler for real, native binaries.
Ownership, no GC
^T owns, &T and &mut T borrow. Moves, borrows and drops are checked at compile time; unsafe is explicit.
A short, readable compiler.
Six plain stages, each its own module — no macro-expansion phase, no hidden optimizer. Types, ownership and borrows are checked before a single line of IL is emitted.
Quick to build. Measured honestly.
The same six programs written in Marrow, C, Rust and Go: how long each toolchain takes to build them, and how fast the result runs. Real numbers from benchmarks/run.py — including the ones where Marrow doesn't win.
Recursive Fibonacci
compile time · milliseconds, median of 15 (lower is better)
Sieve of Eratosthenes, 5M
compile time · milliseconds, median of 15 (lower is better)
Longest Collatz chain below 1M
compile time · milliseconds, median of 15 (lower is better)
Mandelbrot, 400x400, f64
compile time · milliseconds, median of 15 (lower is better)
Quicksort of 1M integers
compile time · milliseconds, median of 15 (lower is better)
200x200 matrix product, f64
compile time · milliseconds, median of 15 (lower is better)
Recursive Fibonacci
run time · milliseconds, median of 7 (lower is better)
Sieve of Eratosthenes, 5M
run time · milliseconds, median of 7 (lower is better)
Longest Collatz chain below 1M
run time · milliseconds, median of 7 (lower is better)
Mandelbrot, 400x400, f64
run time · milliseconds, median of 7 (lower is better)
Quicksort of 1M integers
run time · milliseconds, median of 7 (lower is better)
200x200 matrix product, f64
run time · milliseconds, median of 7 (lower is better)
Intel Xeon @ 2.10GHz, 2 cores · one compiler invocation producing an executable · Compile: 1 warm-up, median of 15 runs, unique source each run so nothing is cached. Run: median of 7 executions of the compiled program.
reproduce →Build: Marrow is about as fast as gcc -O0, quicker than gcc -O2 and clang -O2, and about four times quicker thanrustc and go build; most of its time is qbe and the system assembler and linker. Run: the code QBE emits beats gcc -O0 and lands in the range of Go, behind optimizing compilers (small functions are inlined, but there are no loop optimizations yet). These are small programs on a 2-core VM: read the ratios, not the digits.
Batteries included. No libc underneath.
Every module is written in Marrow itself, on top of a small platform layer (Linux, macOS, Windows). From io to JSON and HTTPS, owned values free themselves.
Early, and honest about it.
Marrow compiles itself: the compiler is written in Marrow and bootstraps to a fixed point. The original Rust compiler lives on in the v1 branch.
Working today
- Self-hosted compiler, bootstrapping to a fixed point
- Ownership, moves, borrows and automatic drop
- Hook structs (
@drop) as owning values, nested or not - Methods (
impl) and single inheritance - Libc-free standard library: files, JSON, HTTPS and more
- Packages, tests, formatter, docs generator and language server
- Cross-compilation to Linux, macOS and Windows
In progress
- Faster generated code (loop optimizations)
- Faster, more incremental builds
- Growing the standard library
- Windows install tooling
One command away.
Installs the marrow and qbe binaries, plus the standard library, to ~/.marrow.
curl -fsSL https://raw.githubusercontent.com/zuygui/marrow/main/install.sh | sh