code wiki / _hdl_build / nx_emu_probe_wasm_gate.nx

nx_emu_probe_wasm_gate.nx

buildroot/runtime/_hdl_build/nx_emu_probe_wasm_gate.nx

3979 B76 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic emu
docsdependenciesstructsconstsfunctions

about

nx_emu_probe_wasm_gate.nx -- R0.0 WASM half, NISHI all the way up. Builds nx_emu_probe.nx -> emu.wasm by FORKING the two sovereign compiler ELFs (nx_compile_wat + nx_wat_compiler) -- the nx_aw_push fork-a-sovereign-sub-ELF pattern, NOT a .sh script -- then EXECUTES p_probe inside the sovereign nx_wasm_vm and checks the result == the native KAT (8081519, from nx_emu_probe_gate). Proves the emulator-shaped kernel compiles to faithful wasm through the fully sovereign pipeline. The build glue is this organ; the verify is nx_wasm_vm. No grep/xxd/.sh anywhere. license_tier: ORIGINAL (build-fork spine from nx_aw_push; VM-verify spine from nx_sha256_wasm_vm_gate)

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_emit_lib.nx nx_wasm_vm.nx nx_emu_probe_wasm_gate.nx

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_wasm_vm.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_puts sys_write run_elf sys_fork sys_mmap sys_execve sys_exit sys_wait4 g_pn sys_mmap ↻ sys_write ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit ↻ wm_new sys_mmap ↻ wm_parse sys_mmap ↻ wv_u8 wv_uleb wm_find_export wm_name_eq g_check g_puts ↻ wm_run wm_find_export ↻ sys_mmap ↻ wm_call sys_mmap ↻ wv_u8 ↻ wm_memo_get wm_match_end sys_mmap ↻ sys_write ↻

structs

none

consts

13const CWAT_ELF: *u8 = "/tmp/nx_compile_wat.sov.elf"
14const WATC_ELF: *u8 = "/tmp/nx_wat_compiler.sov.elf"
15const SRC_NX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_emu_probe.nx"
16const OUT_WAT: *u8 = "/tmp/emu.wat"
17const OUT_WASM: *u8 = "/tmp/emu.wasm"
18const KAT: i64 = 8081519

functions

20func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64
40func main() -> i64