code wiki / _hdl_build / nx_url_get.nx
nx_url_get.nx
buildroot/runtime/_hdl_build/nx_url_get.nx
about
nx_url_get.nx -- the sovereign FETCH-VERIFY CLI that was missing from the live-publish loop. A thin,
reusable wrapper over nx_fetch_staged (validated TLS-1.3 HTTPS GET + redirect-follow + chunked decode, the
same stack the researcher fetches with) so EVERY publish can prove itself: fetch the live URL back, report
the byte count, and (optionally) confirm a content marker is present -- which is stronger than a bare 200,
because it proves the LIVE bytes are OUR page, not an error/placeholder. Closes the verify leg of the
emit -> push -> VERIFY loop (the "live as we work, no hand-waving" standard).
usage: nx_url_get <https-url> [expected-substring-marker]
prints: FETCH OK url=<u> bytes=<n> [+ VERIFIED marker present | WARN marker NOT found]
exit: 0 ok (and marker present if given) / 1 fetch failed / 2 fetched but marker absent / 3 usage
Sovereign: nx_fetch_unit (nx_https_get stack: our DNS + TLS-1.3 + X.509 trust) + nx_syscalls. No curl. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_fetch_unit.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
| 14 | func ug_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 15 | func ug_w(s: *u8) -> i64 { sys_write(1, s, ug_len(s)); return 0 } |
| 16 | func ug_wn(v: i64) -> i64 |
| 27 | func ug_find(hay: *u8, n: i64, needle: *u8) -> i64 |
| 41 | func main(argc: i64, argv: *i64) -> i64 |