code wiki / _hdl_build / nx_dist_publish_gate.nx

nx_dist_publish_gate.nx

buildroot/runtime/_hdl_build/nx_dist_publish_gate.nx

4123 B61 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic dist
docsdependenciesstructsconstsfunctions

about

nx_dist_publish_gate.nx -- proves the HUB-AS-ENABLER multi-transport publish orchestrator (nx_dist_publish): one content-id (SHA-256 of the bytes) fans a landed file out into EVERY transport at once -- magnet (swarm), direct HTTPS (download), content-addressed API, and the Napster-style index row. Uses the NIST sha256("abc") vector so the content-id is checkable by hand. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_dist_publish.nx nx_g_puts_lib.nx nx_syscalls.nx nx_dist_publish_gate.nx

imports: nx_dist_publish.nxnx_g_puts_lib.nxnx_syscalls.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 sys_mmap sys_openat_wr sys_exit sys_write ↻ sys_close dp_content_id sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sys_openat_rd sys_read sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sys_close ↻ sha256_final blk_set_byte ↻ sha256_compress ↻ dp_hexenc ck g_puts ↻ g_streq dp_magnet dp_cat dp_dl_url dp_cat ↻

structs

none

consts

none

functions

9func g_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
10func g_streq(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
11func g_starts(hay: *u8, pre: *u8) -> i64 { var i: i64=0; while pre[i]!=(0 as u8) { if hay[i]!=pre[i] { return 0 } i=i+1 } return 1 }
12func ck(name: *u8, cond: i64, st: *i64) -> i64 { st[1]=st[1]+1; if cond==1 { st[0]=st[0]+1; g_puts(" [OK] " as *u8) } else { g_puts(" [FAIL] " as *u8) } g_puts(name); g_puts("\n" as *u8); return 0 }
called by 1: main calls 1: g_puts
14func main() -> i64