code wiki / _hdl_build / nx_home_registry_gate.nx
nx_home_registry_gate.nx
buildroot/runtime/_hdl_build/nx_home_registry_gate.nx
about
nx_home_registry_gate.nx -- SOVEREIGN proof of nx_home H1 data-driven registry (#11). Writes a TSV registry of
CUSTOM devices, forks /tmp/nx_home.sov.elf pointed at it, and proves over a loopback socket (no python/shell)
that the server loaded the FILE's devices -- not the embedded defaults:
R1 custom devices present (office/garage/porch) R2 custom names loaded (Garage Light)
R3 data-driven, NOT embedded (no living_room) R4 exactly 3 devices (count ids)
R5 command works on a loaded device (garage on:1, bri:50) R6 unknown device -> structured error
Then POST /home/shutdown. GREEN iff 6/6. Requires /tmp/nx_home.sov.elf. knowledge/status/nx_home_registry_gate.log.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_connect.nxnx_gate_emit_lib.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
| 13 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 14 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 15 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 16 | func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 17 | func g_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i } called by 1: write_reg |
| 18 | func g_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 24 | func g_count(hay: *u8, n: i64, needle: *u8) -> i64 |
| 30 | func g_sockaddr(buf: *u8, port: i64, a: i64, b: i64, c: i64, d: i64) -> i64 called by 1: http_req |
| 35 | func http_req(port: i64, req: *u8, reqlen: i64, resp: *u8, cap: i64) -> i64 |
| 47 | func tab(b: *u8, o: i64) -> i64 { b[o]=9 as u8; return o+1 } called by 1: write_reg |
| 48 | func nl(b: *u8, o: i64) -> i64 { b[o]=10 as u8; return o+1 } called by 1: write_reg |
| 49 | func write_reg(path: *u8) -> i64 |
| 57 | func main() -> i64 |