code wiki / _hdl_build / nx_crawl_preserve.nx
nx_crawl_preserve.nx
buildroot/runtime/_hdl_build/nx_crawl_preserve.nx
about
nx_crawl_preserve.nx -- the CRAWL DRIVER: sweep a list of URLs, render-fetch each as a browser (browser headers
+ redirect follow), and archive them all into ONE durable WARC -- then reload it and confirm every preserved
resource retrieves by URL. This is the "capture a dying site before it vanishes" step of the sovereign
Browsertrix, composing bf_fetch_follow (render front) + nx_web_archive (store). Non-200s are skipped + logged
(honest: hard hosts / access-control). Run from nxc2 root. argv[1..] = URLs (default = a small legal set).
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_csprng.nxnx_browser_fetch.nxnx_web_archive.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
| 13 | const K_MAGIC_4194304: i64 = 4194304 |
| 14 | const K_MAGIC_8388608: i64 = 8388608 |
| 15 | const K_MAGIC_33554432: i64 = 33554432 |
functions
| 17 | func pw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func pn(v: i64) -> i64 { let b: *u8=sys_mmap(24); var m: i64=v; if m<0{pw("-" as *u8);m=0-m} let t: *u8=sys_mmap(24); 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 19 | func psl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 21 | func main(argc: i64, argv: *i64) -> i64 calls 1: sys_mmap |