Files
hakorune/docs/development/strategies/de-rust-gap-analysis.md

36 lines
1.4 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.

# DeRust Gap Analysis (Phase 21.9)
This memo enumerates gaps to execute Phase1/2 tasks safely.
## hv1_inline → Parity
- JSON support: ensure compare/branch/jump/phi/mir_call minimal are covered.
- Parity canaries: phase2037/* (flow), phase2170/* (state).
- Env guard: consider `HAKO_VERIFY_DISABLE_INLINE=1` for hard optout (optional).
## TLV Codec → C shim
- Minimal C API: tlv_encode(buf,len, out_ptr, out_len) / tlv_decode(...)
- FFI wrapper in Rust; map errors to Result.
- Tests: roundtrip on byte arrays; malformed inputs; size limits.
## MIR Interpreter (Rust) — Diagnostic mode
- Keep as fallback/diagnostic; Primary = Hakovm.
- Ensure boxcall/mir_call minimal parity for sample set.
- Gate via env to avoid accidental use in primary flows.
## LLVM Wrapper → Hako/C Harness
- Keep Python llvmlite primary until Hako IR is mature.
- Hako wrapper CLI to drive harness with env (`NYASH_LLVM_USE_HARNESS=1`).
- Tests: small endtoend const/ret and simple branch; IR dump gate remains.
## Resolver/Using SSOT (Hako First)
- Runner policy and HakoCheck strip/order unified; document precedence.
- Strict profiles disallow pathliteral using.
## FileBox Core → C (later)
- Small C layer for readonly (Analyzer) and read/write (dev) under caps; Rust shim remains.
## Acceptance Summary
- Build: cargo build (default) green.
- Smokes: quick/core green; parity canaries pass.
- Docs: roadmap + plan page + restore steps present.