code wiki / _hdl_build / nx_nmz_gate.nx

nx_nmz_gate.nx

buildroot/runtime/_hdl_build/nx_nmz_gate.nx

7311 B106 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic nmz
docsdependenciesstructsconstsfunctions

about

nx_nmz_gate.nx -- liar-kill gate for the OMNI Nishi Media container (.nmz), built ON the sovereign substrate (audit fix: REUSE nx_canon_cid NXR1 + nx_uxf_cid multicodec CID, NOT a duplicate). Asserts: SUBSTRATE-REUSE: the content address is the REAL profiled CID "nxc1-05-"+sha256 (codec UXF_ARCHIVE readable back via uxf_codec_of_cid) -- NOT a private djb2; proves we built ON the existing format. KIND + ENTRIES : @kind="book"; book.json round-trips out of the binary-safe NXR1 record (title intact). CONTENT-ADDR : flipping ONE byte CHANGES the CID (content-addressing detects tamper, like canon_cid). DETERMINISM : packing twice -> byte-identical .nmz + identical CID. CONVERGE : a MOBI book ALSO packs to .nmz @kind=book (one omni format, many decoders feed it). GREEN = books/media migrate into the EXISTING owned format (UXF), reusing its sha256 multicodec CID. expect_exit:0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_bin.nx nx_uxf_cid.nx nx_nmz_gate.nx

imports: nx_syscalls.nxnx_canon_bin.nxnx_uxf_cid.nx

imported by: nobody (leaf or entry point)

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

main gp sys_write spawn sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit ↻ canon_get_bin cb_be32 cb_slen uxf_cid_profiled sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ uxf_nib_hex

structs

none

consts

none

functions

14func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
15func gnum(v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(1,"-" as *u8,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48 as u8;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 1: main calls 2: sys_writesys_mmap
16func gslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
18func spawn(path: *u8, a0: *u8, a1: *u8, redir: *u8) -> i64
38func gstreq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 1: main
39func ghas(hay: *u8, hl: i64, needle: *u8) -> i64
called by 1: main
47func main() -> i64