code wiki / _hdl_build / nx_dist_index_gate.nx
nx_dist_index_gate.nx
buildroot/runtime/_hdl_build/nx_dist_index_gate.nx
about
nx_dist_index_gate.nx -- proves the Napster-style registry end to end, composing the ENABLER (nx_dist_publish)
with the INDEX (nx_dist_index): three files land -> content-ids -> published to the registry -> peers announce
they hold one -> a searcher DISCOVERS content by name and learns WHO HAS IT by cid. Idempotent + append-only.
expect_exit: 0 license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_dist_publish.nxnx_g_puts_lib.nxnx_dist_index.nxnx_syscalls.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
| none |
functions
| 10 | func g_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 } |
| 11 | func g_fixture(path: *u8, content: *u8, n: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, content, n); sys_close(fd); return 0 } |
| 13 | func main() -> i64 |