Getting Started
OverviewLanguage GuideFull Reference
Book
Table of ContentsIntroductionPrefaceGetting StartedLanguage TourOwnershipErrorsConcurrencyStdlibNetworkingDataPackagesSpeed & SafetyCross-PlatformToolingCookbookAppendix
Reference
Standard LibraryKeywordsPerformanceSecurityBuilt-in FunctionsStatusDebuggingABI
How-To
Getting StartedHTTP APIsErrorsPackagesConcurrencyMemoryWASITestingRelease Builds
Project
RoadmapVisionChangelogContributing

Mako vision

North star

Memory safety · simple concurrency · fast builds · no mandatory GC · great tooling · clean errors · single binary · strong stdlib.

Product contract: Mako is a versatile, general-purpose backend and infrastructure language. It is approachable and deployable, with strong safety guarantees, predictable performance, and low cognitive overhead for everyday backend work.

Principle What it means
Simple syntax Clean, readable code that gets out of your way
Fast builds Compile times stay short even as projects grow
Easy deploy Static binaries, no runtime dependencies
Channels & actors Structured concurrency without shared-memory bugs
Practical stdlib Batteries included for real backend work
Memory safety Ownership, arenas, and explicit resource control — no use-after-free, no data races
Predictable performance No mandatory GC pauses, no hidden allocations on the hot path
Zero-cost abstractions High-level constructs that compile to efficient machine code

Mako is for backend software, cloud infrastructure, networking systems, developer tools, databases, and high-performance services — without academic ceremony and without a mandatory garbage collector. Product surfaces that must work over time:

Core promise: A simple, productive workflow with strong safety guarantees, expressive abstractions, and predictable performance.

Syntax promise: Mako has its own surface identity. It incorporates proven ideas, but keywords, declarations, concurrency forms, ownership forms, imports, errors, and package ergonomics compose into a language that feels distinctly like Mako.

Honest status lives in STATUS.md. How to write Mako today: The Mako Book (guided tour) and GUIDE.md (verified syntax). This file is the product map (includes Target ideas).


Identity checklist

Pillar Target
Memory Ownership + arenas; RC/manual escapes; optional GC for apps only
Concurrency Tasks, channels, actors, async I/O, crew, cancel/timeouts
Syntax Unique Mako surface; familiar, concise, practical backend style
Errors Explicit, typed, easy ? — unused Result is illegal
Tooling pkg, fmt, lint, test, bench, docs, audit, cross-compile, IDE/LSP
Stdlib net/tls/quic/http/ws, JSON/CBOR/…, DB drivers, queues, observability
Systems Drivers, protocols, DBs, engines, compilers
Generics List<T>, Map<K,V>, Result<T,E> — light interfaces
Deploy Static binaries, small containers, WASM later, fast startup

Versatility Goal

Mako should be equally comfortable for:

The standard for "general purpose" is practical: a beginner should be able to ship a simple API, and an expert should be able to build a database, proxy, compiler, or distributed runtime.


Domain Track — Sessions

Session-oriented servers remain a high-value proving ground: VoIP/telecom, game rooms, connection brokers, streaming gateways, and realtime collaboration.

// Target surface (actors)
actor Session {
    state Call
    receive Invite
    receive Bye
    receive Timer
}

Each actor owns its state — no shared-memory races. Under the hood today: mailboxes on channels + crew (see examples/actor.mko).

Realtime / telecom priority stack

This track should guide runtime and networking decisions without becoming the language's entire identity:

Layer Priority
Transport TCP, UDP, TLS, WebSocket, HTTP/1.1, HTTP/2, HTTP/3, QUIC
Telecom SIP parsing/building, RTP/SRTP packet primitives, session timers
Runtime Lightweight tasks, actors, bounded channels, high-performance timers
Memory Request arenas, pools, ring buffers, zero-copy packet views
Observability Metrics, tracing, profiling, structured logs
Deploy Static binaries, fast cross-compile, Linux/macOS/Windows/ARM/WASM

The rule of thumb: a SIP proxy, signaling server, session controller, WebSocket gateway, or job worker should all feel like obvious Mako programs.


Memory

Mode When Status
Ownership / scopes Default Now
arena Request/batch Now
share / RC Opt-in graphs Next
hold / manual Systems escapes Next
Optional GC App opt-in only Later

No mandatory GC. See SECURITY.md.

Zero-copy (Next/Later): slices, views, borrowed buffers, pools — avoid surprise allocs on the hot path.


Concurrency & async

Feature Status
crew / kick / join / fan Now
Channels Now
crew.cancel Now
Actors (mailbox + owned state) Now (seed)
Timeouts (portable) Next
Async I/O without colored functions Next
Auto cancellation on scope exit Next (partial via crew)
Deterministic scheduling Later

Async goal: normal-looking code, runtime does I/O; structured concurrency keeps lifetimes honest.


Actors (first-class)

Target

actor Session {
    state Call
    receive Invite { ... }
    receive Bye { ... }
    receive Timer { ... }
}

Now: runtime mailbox API + example (actor_spawn / actor_send / actor_recv) modeling Invite/Bye/Timer. Full actor/receive syntax is Next.


Networking

Target builtins: tcp / udp / tls / dns / quic / http / websocket / grpc with .listen()-style APIs.

Piece Status
tcp_listen / tcp_accept / tcp_close / write helpers Now
http_serve / http_echo Now
TLS / QUIC / WebSocket / DNS / gRPC Next / Later

Backend APIs also need routing, middleware, auth, validation, cookies/sessions, file uploads, rate limiting, compression, caching, graceful shutdown, health checks, and background jobs. These should live in stdlib packages or official extensions before third-party frameworks become mandatory.


Serialization & derive

Format Status
JSON (manual / echo) Seed
XML / YAML / TOML / CSV Partial / Later
Binary / CBOR / MessagePack / Protobuf / Avro Later
derive(JSON) / derive(SQL) compile-time Later — no runtime reflect tax

Built-in SQL (Later): typed select verified by the compiler. Raw SQL must always remain available. Database support should cover PostgreSQL, MySQL / MariaDB, SQLite, Redis, MongoDB-style document stores, Cassandra/ClickHouse, and Elasticsearch-compatible systems through stdlib or official packages.


Interfaces / contracts

Light interfaces/protocols — compile-time guarantees, clear contracts, easy mocks. Not a trait maze. Next for language surface.


Dependencies & supply chain

Capability Status
mako.toml + mako.lock Now (foundation)
Version pinning / content hashes Now (lock stub)
Private modules / path deps Next
Reproducible builds Next
Supply-chain / vuln scan (mako pkg audit) Now (offline advisory + license policy)
Minimal transitive deps (culture + tooling) Ongoing

Security defaults

No null · bounds checks · safe strings · unused Result illegal · secure TLS defaults (Next) · crypto done right (Next) · vuln checks in pkg (Next). Details: SECURITY.md.


Debugging & performance tooling

Tool Status
Clear runtime abort messages Now
Stack traces / debugger Next
Race / deadlock / leak detectors Next
CPU / memory / alloc profiler Next
Compiler hints (avoidable allocs, useless locks, escape analysis) Later
Deterministic latency / scheduling Later

Observability is part of the language product, not an afterthought: backend programs should get cheap counters, spans, structured logs, and profiling hooks without pulling in a large framework.


Testing (built-in)

Unit · integration · fuzz · bench · race · property · snapshot · mocks — Next (mako test / mako bench stubs exist).

Coverage, fixtures, parallel tests, leak/race detection, and end-to-end test helpers are part of the general-purpose backend bar.


Compatibility

Strong backward compat, clear versioning, stable stdlib, no constant breaks. API stability annotations — Later. Module isolation — Later.


Tooling & IDE

Tool Status
mako check / build / run Now
mako fmt / lint / test / bench Stub
mako pkg init / lock / audit Now
Docs generator Later
LSP: rename / extract / debug / profile Later (day-one intent)
Cross-compile Later
Incremental compile (1M LOC < 2s rebuild) Later
WASM target Later
Runtime introspection / AI compiler metadata hooks Later
Domain extensions without fragmentation Later

The official toolchain should be a single coherent product: compiler, package manager, formatter, linter, tests, benchmarks, docs, dependency auditor, profiler, debugger integration, LSP, cross-compiler, and build system — all working together out of the box.


Systems / SIMD / GPU / DB / comptime

Theme Status
Systems audience (drivers, engines, protocols) Vision Now
SIMD vector types Later
gpu fn → CUDA/Metal Later
DB engine primitives (storage/index/tx/cache) Later
Comptime const x = scan(...) Later

Deployment

Single static binaries · small containers · easy cross-compile · fast startup · low memory · deploy awareness in tooling (Later).

Targets: Linux, Windows, macOS, FreeBSD, ARM, x86-64, RISC-V, and WebAssembly. Applications should fit single binaries, minimal containers, system services, serverless functions, edge apps, desktop utilities, and embedded agents.


Prioritized roadmap

  1. ~~Channels + cancel~~ · ~~actor mailbox seed~~ · ~~tcp_listen~~ · ~~pkg lock foundation~~
  2. Full actor / receive syntax · portable timeouts · real http.Request + TLS
  3. hold / share · interfaces · mako test for real
  4. JSON derive · Postgres · race detector
  5. Async I/O · QUIC/WS · incremental compile · LSP
  6. Optional GC · SIMD/GPU · comptime · WASM

LANGUAGE.md · STDLIB.md · SECURITY.md · ROADMAP.md

Edit this page on GitHub Report an issue