code wiki / _hdl_build / nx_preserve_live.nx
nx_preserve_live.nx
buildroot/runtime/_hdl_build/nx_preserve_live.nx
about
nx_preserve_live.nx -- THE FULL PIPELINE, live: render-front fetch (browser headers + redirect follow) pulls
the media -> archive its bytes into a WARC -> persist -> reload -> serve byte-exact. This is the sovereign
media-preservation loop end to end on a real host: capture a resource so it survives the origin vanishing.
Run from nxc2 root. argv[1]=url (default = samplelib mp4). 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)
structs
| none |
consts
| 11 | const K_MAGIC_4194304: i64 = 4194304 |
| 12 | const K_MAGIC_8388608: i64 = 8388608 |
| 13 | const K_MAGIC_65536: i64 = 65536 |
functions
| 15 | 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 } |
| 16 | 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 } |
| 17 | func psl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func memeq(a: *u8, ao: i64, b: *u8, blen: i64) -> i64 { var i: i64=0; while i<blen { if (a[ao+i]&0xff)!=(b[i]&0xff) { return 0 } i=i+1 } return 1 } |
| 20 | func main(argc: i64, argv: *i64) -> i64 |