1.1 KiB
1.1 KiB
Phase‑20.30 — Claude Handoff Spec (AOT Bring‑Up)
Scope
- Implement a dev AOT pipeline: MIR(JSON v0) → LLVM IR → object → EXE using ny‑llvmc harness.
- Ship a minimal static runtime lib and a small build script; keep Rust frozen (no new semantics).
Tasks
- Harness
- Add a thin driver to call ny‑llvmc with JSON input and produce IR/object.
- Numeric returns map to rc; print last numeric line.
- Runtime
- Provide/point to
libhakorune_runtime.awith console/time/mem/string/array minimal. - Ensure symbol names are documented and stable.
- Provide/point to
- Build script
tools/hakorune/aot_build.sh: emit JSON via lang, compile with ny‑llvmc, link runtime → EXE.- Env:
HAKO_AOT_RUNTIME_PATH,HAKO_AOT_LD_FLAGS(dev only).
- Canaries
- Build and run
return 7,1+2*3, and simpleif. - Negative: div0; missing extern → stable tag.
- Build and run
- Docs
- Usage and constraints; no changes to default behavior.
Non‑goals
- Dynamic plugin matrix; performance work; new VM semantics in Rust.
Acceptance
- AOT canaries pass locally via script; PR includes docs and minimal scaffolding only.