code wiki / (root) / nx_lib_ingest.nx

nx_lib_ingest.nx

buildroot/runtime/nx_lib_ingest.nx

2486 B38 linesdepth 2pulls 2 transitivereach 9 importersview sourcekind tooltopic lib
docsdependenciesstructsconstsfunctions

about

nx_lib_ingest.nx -- SOVEREIGN local-file ingest into the Nishi research library. Reads a source file and writes it VERBATIM into knowledge/library/ (the research corpus). For binaries (e.g. a PDF), the PDF->text CONVERSION is a SEPARATE workstream; this organ just brings the raw artifact into the library so that workstream + the harvester can pick it up. Sovereign (sys_read_file + sys_write, no cp/coreutils). args: nx_lib_ingest <src-abs-path> <dst-rel-path> (default = the operator-downloaded Nature paper). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 5 importers

nx_syscalls.nx nx_lib_ingest.nx nx_lib_e2e_test.nx nx_lib_http.nx nx_lib_index_test.nx nx_lib_page_test.nx nx_lib_search_test.nx

imports: nx_syscalls.nx

imported by: nx_lib_e2e_test.nxnx_lib_http.nxnx_lib_index_test.nxnx_lib_page_test.nxnx_lib_search_test.nx

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

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close li_p sys_write li_slen sys_exit sys_openat_wr sys_write ↻ sys_close ↻ li_pn sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

9func li_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: li_p
10func li_p(s: *u8) -> i64 { sys_write(1, s, li_slen(s)); return 0 }
called by 1: main calls 2: sys_writeli_slen
11func li_pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); 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{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
13func main(argc: i64, argv: *i64) -> i64