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

4424 B83 linesdepth 3pulls 6 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 4 imports · 0 importers

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

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_wasm_vm.nxnx_gate_verdict.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 nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ 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_munmap sys_close sys_exit ↻ g_check g_puts ↻ gv_ctr sys_mmap ↻ gv_verdict

structs

none

consts

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

functions

21func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64
41func main() -> i64