Files
hakorune/dev/selfhosting/README.md

1.5 KiB
Raw Permalink Blame History

SelfHosting Dev (JIT / VM)

Focus: Ny → MIR → MIRInterp → VM/JIT quick loops to validate semantics and bootstrap paths.

Quickstart

  • Core build (JIT):
    • cargo build --release --features cranelift-jit
  • Core smokes (plugins disabled):
    • NYASH_CLI_VERBOSE=1 ./tools/jit_smoke.sh
  • Roundtrip (parser pipe + json):
    • ./tools/ny_roundtrip_smoke.sh
  • Plugins smoke (optional gate):
    • NYASH_SKIP_TOML_ENV=1 ./tools/smoke_plugins.sh
  • Using/Resolver E2E sample (optional):
    • ./tools/using_e2e_smoke.sh (requires --enable-using)
  • Bootstrap c0→c1→c1' (optional):
    • ./tools/bootstrap_selfhost_smoke.sh

Docs

  • Onepage guide: docs/how-to/self-hosting.md

Flags

  • NYASH_DISABLE_PLUGINS=1: stabilize core path
  • NYASH_LOAD_NY_PLUGINS=1: enable nyash.toml ny_plugins
  • NYASH_ENABLE_USING=1: using/namespace enable
  • NYASH_SKIP_TOML_ENV=1: suppress [env] mapping in nyash.toml

Tips

  • For debug, set NYASH_CLI_VERBOSE=1.
  • Keep temp artifacts under this folder (dev/selfhosting/_tmp/) to avoid polluting repo root.

Dev Loop (Ny-only)

  • One-off run (VM): ./tools/dev_selfhost_loop.sh apps/selfhost-minimal/main.hako
  • Watch + std libs: ./tools/dev_selfhost_loop.sh --watch --std apps/selfhost/ny-parser-nyash/main.hako
  • Make targets:
    • make dev (VM, std on, verbose)
    • make dev-watch (watch mode)

Notes

  • Rebuild Rust only when core changes; Ny scripts reload on each run.
  • Flags: --backend mir|vm, -v for verbose, --std to load [ny_plugins].