Install¶
Requirements¶
- macOS on Apple Silicon (AArch64)
- Python 3.13+
- uv (recommended)
- Xcode Command Line Tools (
xcode-select --install) — providesas,ld, andclang
From source¶
Building the self-hosted compiler¶
The Makefile bootstraps everything from scratch:
make bootstrap # clean rebuild of stage0 + stage1 (sh_kodc)
make stage1 # incremental rebuild
make test # run pytest
Running¶
kod is installed as a uv run script:
uv run kod build hello.kod # compile to a native binary
uv run kod run hello.kod # build + execute
uv run kod test hello.kod # run any `test "..." {}` blocks
uv run kod check hello.kod # parse + codegen; report errors but emit nothing
For a global install:
See CLI reference for the full command surface.