Thanks for being interested in helping out. Here's how to get set up and what we expect from contributions.
- Rust (stable toolchain)
- clang (Xcode on macOS,
apt install clangon Linux, LLVM on Windows) - Optional: OpenSSL, libnghttp2, SQLite, libpq (for live integration tests)
cargo build --release
./target/release/mako --versionOr 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 --checkFor live integration tests (TLS, HTTP/2, QUIC), set the relevant env vars:
MAKO_LIVE_TLS=1 cargo run --release -- test examples/testingTo help you navigate the codebase, here is an overview of how the repository is organized:
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 Makori 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/— tokenizationsrc/parser/— recursive descentsrc/types/— type checking + NLL move analysissrc/codegen/— C code emissionsrc/cc.rs— C compiler invocation
Process bar (same as Agents.md):
- Speed is the name of the game (≈ Rust) — no silent cost on the default hot path.
Runtime/codegen/concurrency changes:
./scripts/bench-gate.sh(docs/SPEED.md). - Concurrency first-class — structured
crew/fan/ channels; no orphan tasks; no async coloring as the default model. - Security first-class — hard errors over advice; secure defaults; costly checks stay opt-in (docs/SECURITY.md).
- Always check your work — report command + outcome; do not claim green from intent.
- Be adversarial — empty/null, overflow, timeout, double-close, races, injection edges.
- Always test — automated coverage that would fail on regression.
- Build consensus — speed first, then concurrency/security, then identity; one path only.
Steps:
- Create a branch from
main - Make your changes
- Add or update tests if behavior changes
- Update docs in the same change — no feature without docs. Touch every applicable surface (BUILTINS, STDLIB, GUIDE/book, CLI/DEBUG/PERFORMANCE, CHANGELOG, STATUS/ROADMAP). See Agents.md Always update the docs
- Run
cargo clippyandcargo fmt - Run
cargo run --release -- test examples/testingand make sure it passes - Open a PR with a clear description of what and why
| 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.
- Keep it simple. Don't over-abstract.
- Match the existing code style in whatever file you're editing.
- Runtime C code follows the existing naming:
mako_prefix, snake_case. - Makori source files use
.mkoextension.
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:
- Create
std/<package>/<module>.mkowith the public API - Implement the runtime in
runtime/mako_<name>.h - Wire it into codegen (see existing patterns in
src/codegen/mod.rs) - Add tests in
examples/testing/ - Document in
docs/STDLIB.md,docs/BUILTINS.md, and the book/guide as needed
Open an issue on GitHub with:
- What you expected to happen
- What actually happened
- Minimal
.mkofile that reproduces the problem - Output of
mako --version
By contributing, you agree that your contributions will be licensed under the MIT License.