Files
hakorune/docs/releases/21.0-full-selfhosting.md

45 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# Phase 21.0 — Full SelfHosting (Release Notes)
Date: 20251106
Status: COMPLETE
## Summary
Hakorune can now build Hakorune endtoend under the defined DoD:
- S1/S2 (deterministic v1 emit): const/compare/threeblockcollect repeat 3× with identical normalized hash.
- PRIMARY (nofallback): hv1 inline minimal reps (OptionA/B) are green.
- S3 (llvmlite + Nyash Kernel): link + run representatives pass with expected return codes.
## What changed
- v1 → llvmlite harness direct path
- tools/ny_mir_builder.sh now feeds v1 JSON straight to the Python harness and links against libnyash_kernel.a.
- Python LLVM builder fixes
- compare: supports `cmp` (Lt/Le/Gt/Ge/Eq/Ne) and normalizes to `<, <=, >, >=, ==, !=`.
- ret: synthesizes a small PHI at block head to avoid ret=0 on multipred blocks.
- mir_call: accepts both nested and flat shapes.
- Using/alias (prod)
- modules mapping is considered first; missing aliases added for `selfhost.vm.hakorune-vm.str_cast` and `selfhost.vm.helpers.method_alias_policy`.
- Duplicate `using` lines cleaned in extern_provider.
## How to verify (quick)
- Oneshot (S1/S2 + PRIMARY + S3 auto):
```bash
bash tools/smokes/v2/profiles/quick/core/phase2100/run_all.sh
```
- S3 only (auto when LLVM18/llvmlite present):
```bash
NYASH_LLVM_S3=1 bash tools/smokes/v2/profiles/quick/core/phase2100/run_all.sh
```
## Environment
- LLVM 18 (llvm-config-18) + llvmlite (Python 3)
- For faster runs: prebuild
```bash
cargo build --release --features llvm
cargo build --release -p nyash-llvm-compiler
cargo build --release -p nyash_kernel
```
## Next
- Optional: broaden reps and harden typeops/extern coverage in followon phases.