Thanks for being interested in helping out. Here's how to get set up and what we expect from contributions.
apt install clang on Linux, LLVM on Windows)cargo build --release
./target/release/mako --version
Or use the Makefile:
make release # cargo build --release
make install # installs to ~/.local/bin + ~/.local/share/mako/runtime
# Full Mako test suite (130 tests)
cargo run --release -- test examples/testing
# Specific test
cargo run --release -- test examples/testing -r TestAdd -v
# Rust-level checks
cargo clippy
cargo fmt --check
For live integration tests (TLS, HTTP/2, QUIC), set the relevant env vars:
MAKO_LIVE_TLS=1 cargo run --release -- test examples/testing
src/ Compiler (Rust) — lexer, parser, types, codegen, CLI
runtime/ C runtime headers (included by emitted C code)
std/ Standard library (.mko modules)
examples/ Example programs and test suite
testing/ Test files (*_test.mko)
bad/ Negative tests (expected compiler errors)
docs/ Documentation
book/ The Mako Book (mdBook)
howto/ Task-oriented guides
editors/vscode/ VS Code extension
scripts/ Build, test, and release scripts
Source (.mko) → Lexer → Parser → Desugarer → Typechecker (NLL) → Codegen (C) → clang/zig → Binary
Key modules:
- src/lexer/ — tokenization
- src/parser/ — recursive descent
- src/types/ — type checking + NLL move analysis
- src/codegen/ — C code emission
- src/cc.rs — C compiler invocation
Process bar (same as Agents.md):
./scripts/bench-gate.sh (docs/SPEED.md).crew / fan / channels; no orphan tasks; no async coloring as the default model.Steps:
maincargo clippy and cargo fmtcargo run --release -- test examples/testing and make sure it passes| Keep out of commits | Why |
|---|---|
Accidental binaries (trap_ov, root hello, /out/…) |
Build artifacts — listed in .gitignore |
.claude/, .cursor/, .grok/, *.local.md |
Local agent/editor state |
| Secrets, certs, personal env files | Security |
Unrelated local edits to AGENTS.md process notes |
Prefer human-facing policy in this file / docs/; only change AGENTS.md when the project north star intentionally changes |
Never git add -A / git add . blindly — stage only source, tests, docs, and intentional config for the change.
mako_ prefix, snake_case..mko extension.Standard library modules live in std/. Each module has a corresponding runtime
implementation in runtime/mako_*.h. If you're adding a new stdlib module:
std/<package>/<module>.mko with the public APIruntime/mako_<name>.hsrc/codegen/mod.rs)examples/testing/docs/STDLIB.md, docs/BUILTINS.md, and the book/guide as neededOpen an issue on GitHub with:
- What you expected to happen
- What actually happened
- Minimal .mko file that reproduces the problem
- Output of mako --version
By contributing, you agree that your contributions will be licensed under the MIT License.