Files
hakorune/docs/private/roadmap/phases/phase-20.30

Phase20.30 — SelfContained AOT Build (Gostyle bootstrap)

Purpose

  • Produce a selfcontained Hakorune binary via LLVM AOT so “Hakorune builds Hakorune” becomes practical (Gostyle).

Inscope

  • MIR(JSON v0) → LLVM IR → object → EXE (AOT path, harness first).
  • Minimal runtime static lib packaging for AOT (string/array/map day1, console, time, mem).
  • Dev wrapper/script to drive endtoend: lang emit → AOT → run.

Outofscope

  • Full stdlib, dynamic plugin matrix, performance tuning beyond correctness.

Deliverables

  • hakorunefrozen (last Rustbuilt) produces hakorunenew 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 pluginonly unless a tiny host path is added for AOT.
  • Prefer harness (nyllvmc) for IR/object flow to avoid widening Rust scope (freeze honored).