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
maincargo clippy and cargo fmtcargo run --release -- test examples/testing and make sure it passesmako_ 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.mdOpen 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.