Files
hakorune/dev/cranelift/README.md

27 lines
855 B
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.

Cranelift JIT/AOT Dev
Focus: Cranelift JITdirect and AOT (object emit + link with `libnyrt.a`).
Quick AOT Smoke
- Build core (once):
- `cargo build --release --features cranelift-jit`
- Lower to object + link with NyRT:
- `NYASH_DISABLE_PLUGINS=1 tools/aot_smoke_cranelift.sh apps/smokes/jit_aot_string_min.nyash app_str`
- Run app:
- `./app_str`
Useful env toggles
- `NYASH_JIT_DUMP=1`: show JIT lowering summary
- `NYASH_JIT_TRACE_LOCAL=1`: trace local slot loads/stores
- `NYASH_JIT_TRACE_RET=1`: trace return path
- `NYASH_JIT_TRACE_LEN=1`: trace string/any len thunks
- `NYASH_JIT_DISABLE_LEN_CONST=1`: disable early constfold for String.length
Notes
- For AOT linking: requires `libnyrt.a` from `crates/nyrt` (built by `cargo build --release`).
- Use `target/aot_objects/` as scratch; keep perexperiment subfolders if needed.