How terracotta-linux/kiln works
Kiln turns local TOML into a bootable Arch system image through frontend, resolution, realization, assembly, normalization, and OSTree deployment. The plan/realize boundary supports check without building; commits carry records used for change detection and reconstruction. The README documents major capabilities beyond the sampled excerpts, so those are represented at their documented subsystem paths; edges are limited to the documented workflow and sampled orchestration.
Main entry points: main.rs Command dispatch · build.rs Build and apply · lib.rs Plan resolution · pipeline.rs Build pipeline
Components 20
CLI and config
- Command dispatch
crates/kiln-cli/src/main.rs - Config frontend
crates/kiln-config/src/lib.rs - Include and merge
crates/kiln-config/src/include.rs - Validate manifest
crates/kiln-config/src/validate.rs - Check commands
crates/kiln-cli/src/check.rs
Manifest and resolution
- Canonical manifest
crates/kiln-manifest/src/manifest.rs - Build pipeline
crates/kiln-cli/src/pipeline.rs - Plan resolution
crates/kiln-resolve/src/lib.rs - Arch package solver
crates/kiln-alpm/src/session.rs - AUR metadata
crates/kiln-aur/src/lib.rs
Build and image
- Build and apply
crates/kiln-cli/src/build.rs - Package realization
crates/kiln-build/src/build.rs - Build isolation
crates/kiln-sandbox/src/lib.rs - Root assembly
crates/kiln-image/src/assemble.rs - Image normalization
crates/kiln-image/src/normalize.rs
OSTree and history
- Build record
crates/kiln-record/src/record.rs - Commit and deploy
crates/kiln-ostree/src/lib.rs - Generation control
crates/kiln-ostree/src/deploy.rs - OSTree repository
Other components
- System operator
Connections 24
- System operator → Command dispatch: runs commands
- Command dispatch → Config frontend: loads config
- Config frontend → Include and merge: expands includes
- Config frontend → Validate manifest: validates input
- Validate manifest → Canonical manifest: produces
- Command dispatch → Build pipeline: starts workflow
- Build pipeline → Plan resolution: resolves manifest
- Plan resolution → Canonical manifest: reads
- Plan resolution → Arch package solver: queries repositories
- Plan resolution → AUR metadata: queries AUR
- Command dispatch → Check commands: dispatches check
- Check commands → Build pipeline: plans changes
- Command dispatch → Build and apply: dispatches build
- Build and apply → Build pipeline: plans build
- Build and apply → Package realization: realizes plan
- Package realization → Build isolation: runs isolated builds
- Build and apply → Root assembly: assembles image
- Root assembly → Arch package solver: transacts packages
- Root assembly → Image normalization: normalizes root
- Build and apply → Commit and deploy: commits image
- Commit and deploy → Build record: stores build record
- Commit and deploy → OSTree repository: writes commit
- Command dispatch → Generation control: dispatches generation commands
- Generation control → OSTree repository: stages or reorders