1.0 KiB
1.0 KiB
Phase‑20.30 — Self‑Contained AOT Build (Go‑style bootstrap)
Purpose
- Produce a self‑contained Hakorune binary via LLVM AOT so “Hakorune builds Hakorune” becomes practical (Go‑style).
In‑scope
- MIR(JSON v0) → LLVM IR → object → EXE (AOT path, harness first).
- Minimal runtime static lib packaging for AOT (string/array/map day‑1, console, time, mem).
- Dev wrapper/script to drive end‑to‑end: lang emit → AOT → run.
Out‑of‑scope
- Full stdlib, dynamic plugin matrix, performance tuning beyond correctness.
Deliverables
- hakorune‑frozen (last Rust‑built) produces hakorune‑new via AOT.
- Tiny program AOT canary (return/binop/if) builds and runs (rc/last line parity).
- Docs: AOT pipeline, runtime lib spec, env toggles, known limits.
Refs
- guides/aot-build.md
Risks/Notes
- Runtime surface must be minimal and stable; Map remains plugin‑only unless a tiny host path is added for AOT.
- Prefer harness (ny‑llvmc) for IR/object flow to avoid widening Rust scope (freeze honored).