code wiki / _hdl_build / nx_library_consume.nx

nx_library_consume.nx

buildroot/runtime/_hdl_build/nx_library_consume.nx

3777 B53 linesdepth 10pulls 13 transitivereach 0 importersview sourcekind tooltopic library
docsdependenciesstructsconstsfunctions

about

nx_library_consume.nx -- the CONSUME engine: ingest a queue of fetched science documents into the sovereign no-link-rot library (nx_library). The queue is an INLINED sovereign seed (extensible; grows as the researcher fetches more during downtime -- the eventual data-driven source list lives in the seg_store, NOT a TSV). Each doc -> content-addressed CID + dedup + running index + metadata. Idempotent (re-run = all DUP). This is "downtime consuming": fetch (nx_research_fetch) lands files in knowledge/fetched/, this sweeps them into the corpus so the knowledge is owned + reproducibly citable forever. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_library.nx nx_library_consume.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_library.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cw_w sys_write sys_mmap cons_one sys_mmap ↻ lib_ingest sys_mmap ↻ lib_read sys_openat_rd sys_read sys_close cat_ingest_cid ar_cid cid_of sys_mmap ↻ sha256_digest cid_from_digest sys_munmap ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_cat ss_loadfile ss_load_aux2 ssl_total_keys ssl_pow2 ssl_build ss_r32 ssl_lookup ss_manifest_free sys_munmap ↻ sys_mmap ↻ cat_idx_load sys_mmap ↻ ss_hget sys_mmap ↻ ss_idx_find cat_idx_key

structs

none

consts

none

functions

11func cw_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: cons_onemain calls 1: sys_write
16func cw_n(v: i64) -> i64 { nxi_out(v); return 0 }
calls 1: nxi_out
17func cw_pfx(cid: *u8, k: i64) -> i64 { var i: i64=0; while i<k { if cid[i]==(0 as u8){break} let o: *u8=sys_mmap(1); o[0]=cid[i]; sys_write(1,o,1); i=i+1 } return 0 }
called by 1: cons_one calls 2: sys_mmapsys_write
19func cons_one(path: *u8, src: *u8, title: *u8, nw: *i64, dup: *i64) -> i64
called by 1: main calls 4: sys_mmaplib_ingestcw_wcw_pfx
27func main() -> i64