code wiki / (root) / nx_diff.nx

nx_diff.nx

buildroot/runtime/nx_diff.nx

5596 B182 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic diff
docsdependenciesstructsconstsfunctions

about

nx_diff.nx -- byte-level binary diff (sovereign cmp / xxd | diff). The F6 reproducibility gate compares the SHA-256 of compiled outputs. When a build fails the gate, you get "hashes differ" and nothing else -- you have to dig in to find WHERE. This module implements the digging: - cmp-style: first differing byte offset (or -1 if equal). - hex-window: dump 16-byte windows around each difference so you can eyeball whether the diff is endian, padding, a symbol-name string, or a relocation patch. - diff stats: total differing bytes + % similarity. Pairs with bench/f6_manifest.txt + bootstrap_proof.sh. When a stage-N hash drifts, run nx_diff against the stage-1 baseline to find what changed. Not a textual diff -- this is for binaries. For source-level diffs use git diff.

dependencies 1 imports · 0 importers

syscalls.nx nx_diff.nx

imports: syscalls.nx

imported by: nobody (leaf or entry point)

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

main nx_diff_first nx_diff_count nx_diff_report nx_diff_dec nx_diff_first ↻ nx_diff_hex_window nx_diff_hex_byte nx_diff_count ↻

structs

none

consts

none

functions

32func nx_diff_first(a: *u8, b: *u8, len: i64) -> i64
called by 2: nx_diff_reportmain
43func nx_diff_count(a: *u8, b: *u8, len: i64) -> i64
called by 2: nx_diff_reportmain
54func nx_diff_hex_byte(fd: i64, v: i64) -> i64
called by 1: nx_diff_hex_window
66func nx_diff_hex_window(fd: i64, p: *u8, len: i64) -> i64
called by 1: nx_diff_report calls 1: nx_diff_hex_byte
90func nx_diff_dec(fd: i64, v: i64) -> i64
called by 1: nx_diff_report
114func nx_diff_report(fd: i64, a: *u8, b: *u8, len_a: i64, len_b: i64) -> i64
159func main() -> i64