mu language

Minimal by design. Built for clarity.

mu (µ) is a focused programming language with a fast stage-0 host, a stack-based VM, and a roadmap toward self-hosting. It values legibility, small primitives, and a standard library that stays out of the way.

hello, mu

fn main() {
  println("Hello World!")
}

main()

Readable entrypoints, no ceremony, and a REPL-first workflow.

Why mu

mu is for builders who want a compact language, a transparent compiler pipeline, and a runtime they can reason about.

Intentional syntax

Small grammar, explicit control flow, and no hidden magic.

Stack-based VM

Bytecode that is simple to inspect, profile, and eventually reimplement.

Composable stdlib

Keep the host minimal and move capability into mu-written libraries.

REPL-first

Iterate fast, explore ideas, and turn them into modules.

A clear pipeline

The stage-0 host keeps the compiler, assembler, and VM transparent. Every instruction is part of an evolving contract between the spec, the VM, and the native backend.

Lexer → Parser Readable tokens, predictable ASTs.
Compiler → VM Bytecode that stays understandable.
Roadmap Self-hosting and native compilation.

What you can do today

  • Run examples and inspect bytecode.
  • Experiment in the REPL with new ideas.
  • Extend the stdlib in mu itself.

Start with the guide

Two engines, one language

mu ships with a bytecode VM for fast iteration and a native backend for deployment. The VM is the reference implementation; native compilation follows the same semantics.

Bytecode VM

Fast startup, introspectable bytecode, and a REPL-first workflow.

Native compilation

A toolchain-free backend that lowers the same IR to real binaries.

Macro system

Compile-time AST transforms for ergonomic helpers without runtime cost.

FFI + syscalls

Call native libraries or raw syscalls with explicit, inspectable signatures.

Read the language tour, dive into the runtime, or study the spec. See the docs index for everything else.

Build and run mu

The stage-0 host is a single Go binary. Build once, then run scripts, explore the REPL, or emit bytecode/native artifacts.

Build the host

go build ./cmd/mu

Run a script

./mu examples/hello.mu

Emit bytecode

./mu -S -o hello.ir hello.mu

Native build

./mu -B -o hello hello.mu