Files
hakorune/docs/releases/21.0-full-selfhosting.md
nyash-codex e326e787a4 release: v21.0.0 – Full Self‑Hosting (S1/S2/S3 complete)
- DoD met: S1/S2 determinism (const/compare/threeblock-collect), PRIMARY hv1 inline no-fallback, S3 (llvmlite+kernel) reps green
- Harness: v1→llvmlite direct, EXE links to libnyash_kernel.a
- Python LLVM builder fixes: cmp normalization, ret PHI synthesis, mir_call flat shape
- Using/alias polish (prod): modules-first; missing aliases added; duplicate using cleaned
- Docs: phase-21.0 COMPLETE; CurrentTask closed; release notes added
2025-11-06 16:59:34 +09:00

45 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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.