Files
hakorune/docs/private/roadmap/phases/phase-20.30/CLAUDE_SPEC.md

1.1 KiB
Raw Blame History

Phase20.30 — Claude Handoff Spec (AOT BringUp)

Scope

  • Implement a dev AOT pipeline: MIR(JSON v0) → LLVM IR → object → EXE using nyllvmc 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 nyllvmc with JSON input and produce IR/object.
    • Numeric returns map to rc; print last numeric line.
  • Runtime
    • Provide/point to libhakorune_runtime.a with console/time/mem/string/array minimal.
    • Ensure symbol names are documented and stable.
  • Build script
    • tools/hakorune/aot_build.sh: emit JSON via lang, compile with nyllvmc, link runtime → EXE.
    • Env: HAKO_AOT_RUNTIME_PATH, HAKO_AOT_LD_FLAGS (dev only).
  • Canaries
    • Build and run return 7, 1+2*3, and simple if.
    • Negative: div0; missing extern → stable tag.
  • Docs
    • Usage and constraints; no changes to default behavior.

Nongoals

  • Dynamic plugin matrix; performance work; new VM semantics in Rust.

Acceptance

  • AOT canaries pass locally via script; PR includes docs and minimal scaffolding only.