All languages

Mk language

A small systems language compiled through LLVM: ownership, borrowing and linear values checked from signatures, arenas as the default allocator, and structured tasks.

Overview

Mk is a small, statically typed systems language for software that has to be fast and correct: tools, servers, runtimes and kernels. Its compiler checks ownership, borrowing and linear values from signatures alone and reaches native code through LLVM, with no garbage collector and no C runtime.

Code

export Main(sys: &System): WriteError!void {
    n := 41                               // `int`: the type comes from the value
    try sys.Print("{m}\n", (m: n *% 2))   // `*%` wraps where `*` would panic
}
A literal, its wrapping operator and try; a value taken apart by match; a generic under a bound. A task joined by scope; an arena freed whole.

Distinctive traits

  • Borrowing without lifetimes: values hold the loans they depend on, and from/into clauses replace lifetime parameters.
  • Arenas are the default: List, Map and Text are freed with their region, so most functions never release memory.
  • Linear values replace destructors: a file or arena must be consumed exactly once on every path, so a forgotten close is a compile error.
  • Every fallible signature names its error set; try is a prefix and integer overflow traps in release builds too.
  • Structured concurrency: a scope block joins its tasks, so a task may borrow a parent's local and conflicting loans do not compile.
  • Small by design: no macros, no inheritance, no implicit conversions; generics, contracts, compile-time evaluation, unsafe blocks and C interop stay.

Status

Mk 0.2.1 shipped in November 2026 under MIT, with release bundles for Windows, Linux on x86-64 and ARM, and Apple silicon. A module is a directory; a package is a pkg.mk manifest. Pre-1.0, a minor release may change stable items.

Sources & references