AppendixToolchains
Bootstrapper and Managed Toolchains
How `kira`, `kirac`, templates, and the managed install layout work.
Launcher vs Real CLI
The user-facing command is kira.
Its job is to:
- find the active managed Kira toolchain
- forward the command into the real CLI binary (
kirac) - keep the path-facing launcher stable while the managed toolchain layout evolves
Managed Install Layout
The install flow writes:
~/.kira/toolchains/current.toml
~/.kira/toolchains/<channel>/<version>/
bin/
kirac[.exe]
templates/
llvm-metadata.tomlcurrent.toml records:
- channel
- version
- primary executable
That is how the launcher knows which real toolchain to launch.
Developer Targets
The repo keeps the most common build targets explicit:
zig build kirac
zig build kira-bootstrapper
zig build install-kirac
zig build installThose let you validate the managed toolchain flow without guessing how it is packaged.
Resource Discovery
When the CLI needs runtime resources, it looks in this order:
- the managed toolchain root if the current executable is already running from it
- the repo root when running directly from the checkout
- the managed toolchain root selected by channel/version
That resource root is what gives the CLI access to:
llvm-metadata.tomltemplates/
Template Apps
kira new copies from the managed template tree, not from a remote service.
Current template output:
kira.tomlapp/main.kira
The template is intentionally small. It reflects the current executable subset instead of pretending the repo already ships a full batteries-included application framework.