Runtime model

mu programs compile to bytecode and run on a small, stack-based VM. The VM is the reference implementation for language semantics.

The execution pipeline

  1. Lexing and parsing produce an AST.
  2. The compiler lowers the AST into bytecode (via a small IR).
  3. The VM executes the bytecode on a stack machine.

Bytecode VM

Native backend

The native backend lowers the same IR into machine code without external assemblers. It keeps semantics aligned with the VM so programs behave the same in either mode.

Deterministic concurrency

Tasks and channels use cooperative scheduling with FIFO queues. Blocking operations (send/recv/wait/sleep and I/O) yield so the scheduler can resume other work deterministically.

Learn more

Next steps