code wiki / _hdl_build / nx_faithdiff.nx
nx_faithdiff.nx
buildroot/runtime/_hdl_build/nx_faithdiff.nx
about
nx_faithdiff.nx -- THE WAT-FAITHFULNESS DIFFERENTIAL DEBUGGER (operator 2026-07-06: "build the tool that
can troubleshoot this in one step in <10s so we can eat the debt and grow"). ONE command:
nx_sov_build_run nx_faithdiff
It (1) compiles nx_faithdiff_probe.nx -> wasm via the two sovereign compilers, (2) loads it in the
sovereign wasm-VM, (3) runs EACH probe function in the VM AND natively over an input battery, (4) reports
the FIRST function+input where VM != native. That pin is the exact WAT-lowering (or VM-interp) bug --
no more manual bisect-by-rebuild. To debug any new module: paste its suspect funcs into the probe + run.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_wasm_vm.nxnx_faithdiff_probe.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const K_MAGIC_262144: i64 = 262144 |
| 13 | const K_MAGIC_65535: i64 = 65535 |
| 15 | const CWAT: *u8 = "/tmp/nx_compile_wat.sov.elf" |
| 16 | const WATC: *u8 = "/tmp/nx_wat_compiler.sov.elf" |
| 17 | const SRC: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/nx_faithdiff_probe.nx" |
| 18 | const WAT: *u8 = "/tmp/nx_faithdiff_probe.wat" |
| 19 | const WASM: *u8 = "/tmp/nx_faithdiff_probe.wasm" |
functions
| 21 | func fw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 22 | func fn(v: i64) -> i64 |
| 27 | func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 43 | func fill_block(cur: *u8, seed: i64) -> i64 called by 1: main |
| 54 | func main() -> i64 |