Mako is a compiled language for backend and systems work. You write .mko
files; Mako turns them into standalone native binaries — no garbage collector,
no VM, nothing extra to install next to them at runtime.
Status: alpha (v0.5.1). It works, it compiles real programs, people have built things with it. It is not stable. APIs will change, features are missing, and there are bugs. If that's fine with you, read on.
mako-lang.com · Changelog · Roadmap · Status
Linux
curl -fsSL https://github.com/loreste/mako/releases/latest/download/install-linux.sh | bash
source "$HOME/.local/share/mako/env.sh"
mako versionmacOS
curl -fsSL https://github.com/loreste/mako/releases/latest/download/install-release.sh | bash
source "$HOME/.local/share/mako/env.sh"Windows — grab the .zip from Releases,
or build from source with LLVM clang on PATH.
From source (needs Rust):
make install
mako versionYou do not need Rust on the machine that runs Mako. The installer downloads a prebuilt binary bundle.
fn main() {
let ch = make(chan[string], 4)
crew t {
let p = t.kick(produce(ch))
for msg in range ch {
print(msg)
}
let _ = p.join()
}
}
fn produce(ch: chan[string]) -> int {
let _ = ch.send("hello")
let _ = ch.send("world")
ch.close()
return 0
}
mako init hello && cd hello
mako run main.mko
mako build --release main.mko -o helloLanguage. Static types with local inference. Result[T, E] and Option[T]
with ? propagation. Pattern matching. Enums with payloads. Generics
(monomorphized). Interfaces (structural, like Go). Closures. Tuples and
multi-return. Integer literals in decimal, hex (0xFF), binary (0b1010),
and octal (0o77) with _ separators. defer. Labeled loops. F-strings.
Struct update syntax.
Memory. Ownership tracking with compile-time move checks. Arenas for
bulk allocation. Bounds checks in debug and release. Escape analysis.
Deterministic cleanup — no GC, no reference counting on the hot path.
The ownership and runtime safety model was introduced in 0.2.4 and
continues to be hardened through adversarial tests, sanitizers, and
regression gates. It is not proven complete. unsafe and FFI are
outside the model.
Concurrency. crew / kick / join — structured concurrency where
ordinary crew jobs cannot outlive their scope. Explicit detach tasks are
process-scoped and require separate lifecycle management. Typed channels
(chan[int], chan[string], chan[T]), select, fan for parallel map.
Actors with mailboxes. No free go keyword — every spawned task has an owner.
Stdlib. HTTP server and client. TLS (OpenSSL). WebSocket. JSON. SQLite and Postgres. SIP parsing and building. HEP (Homer) ingest. UDP/TCP/Unix sockets. File I/O. Regex. UUID. Base64. Binary buffers. Prometheus metrics. Crypto (SHA-256, HMAC, PBKDF2, AEAD). Coverage is uneven — STDLIB.md records what has real tests and what only verifies its shape.
Backends. Native object code is the default (Cranelift). The C backend
remains available via --backend c and is used automatically for sanitizers,
cross-compilation, and emit-c. Both pass 395/395 tests and produce standalone
binaries. LLVM release builds available with --backend llvm --release.
Both the C and native backends require clang for final linking. Only specially
built LLVM/LLD configurations avoid the system linker.
Packages. mako pkg manages dependencies with a lockfile, SHA-256 content
hashes, and SemVer resolution. Supports path deps, git deps, local registry,
and remote HTTPS registry. The default public registry is
https://loreste.github.io/mako-packages — mako pkg get <name> fetches
from it automatically. Packages can be signed with ed25519 and verified
on fetch.
Tooling. mako fmt, mako lint, mako test (with JSON reports), mako check.
LSP server with completions, go-to-def, references, rename, diagnostics,
and inlay hints. VS Code extension.
- Both backends require clang for linking (the installer handles this on Linux)
- WASM: WASI Preview 1 only — no sockets, no TLS, no Preview 2/WIT/DOM
- Sanitizers, cross-compilation, and emit-c auto-fall back to the C backend
- No debugger product (lldb works with
#linesource mapping, but no IDE integration beyond seeds) - Stdlib coverage is uneven — some APIs are shape-only
- No stable ABI promise
- Package registry is public but has few packages; signing lacks key rotation and revocation
- Windows: ~21 test fixtures fail (filesystem semantics, signals, crypto paths); HTTP engine incomplete
- Package security model is not independently audited
STATUS.md has the full honest list.
Mako has no free go. Every task belongs to a crew:
crew t {
let a = t.kick(work(1))
let b = t.kick(work(2))
print(a.join())
print(b.join())
}
// both tasks joined here, guaranteed
Channels are typed and work across kicked tasks:
let ch = make(chan[string], 8)
// send from one task, range-recv in another
for msg in range ch {
print(msg)
}
Mako compiles to WASM via the C backend and zig (or wasi-sdk):
mako build main.mko --target wasm32-wasip1 -o main.wasm
wasmtime main.wasmWASI Preview 1 is supported — args, env, filesystem (via preopens), stdout.
Networking, TLS, and stdlib areas that depend on POSIX sockets or OpenSSL are
not available in WASM. The output is a standalone .wasm module runnable by
wasmtime, wasmer, or any WASI-compatible runtime.
# With filesystem access
wasmtime --dir=./data::. main.wasm
# With env vars and args
wasmtime --env KEY=value main.wasm arg1 arg2
# Browser/edge scaffold
mako deploy wasm dist --entry main.mko --wasm app.wasm --port 8080Limitations: WASI Preview 1 only. No Preview 2 component model, no WIT,
no browser DOM bindings, no WASM sockets. Cross-compilation requires zig on
PATH or WASI_SDK_PATH set.
If a function returns Result, you have to handle it:
fn load(path: string) -> Result[string, string] {
let data = read_file(path)?
Ok(data)
}
mako test examples/testing # run all tests
mako test -r TestAdd -v # filter + verbose
mako test --sanitize address examples/testing # under ASan395 test files. The complete suite is exercised under ASan and UBSan in CI. A focused concurrency subset is exercised under TSan.
| The Mako Book | Start here |
| Language Guide | Syntax reference |
| Standard Library | What's included |
| CLI Reference | Commands and flags |
| Examples | Runnable programs |
| Performance | Benchmarks (including where Mako is slower) |
| Soundness | Memory safety program |
| Security | Safety model |
| Status | What works, what doesn't |
VS Code extension with syntax highlighting, LSP, format-on-save, and a dark
theme. The language server (mako lsp) speaks stdio JSON-RPC.
See editors/vscode/.
See CONTRIBUTING.md.
MIT