code wiki / _hdl_build / nx_se_addr_probe.nx
nx_se_addr_probe.nx source
↩ module page · 15 lines · 664 B
1// nx_se_addr_probe.nx -- one-shot probe: does nx_swarm_endpoint_lib resolve gpu-image from THIS
2// process's CWD? Prints the resolved addr or SSOT-MISS. Exists to prove the CWD-proof absolute
3// fallback (2026-08-04) under the gen daemon's real CWD (/volume1/ai/gen). license_tier: ORIGINAL
4import "nx_swarm_endpoint_lib.nx"
5
6func main(argc: i64, argv: *i64) -> i64 {
7 let a: *u8 = se_addr("gpu-image" as *u8)
8 if (a as i64) == 0 { sys_write(1, "SSOT-MISS\n" as *u8, 10); return 1 }
9 var n: i64 = 0
10 while a[n] != (0 as u8) { n = n + 1 }
11 sys_write(1, "SSOT-ADDR=" as *u8, 10)
12 sys_write(1, a, n)
13 sys_write(1, "\n" as *u8, 1)
14 return 0
15}