code wiki / _hdl_build / nx_search_register.nx
nx_search_register.nx
buildroot/runtime/_hdl_build/nx_search_register.nx
about
nx_search_register.nx -- INTEGRATION DISCOVERY (loose coupling). Discovers every queryable Nishi index and
writes the search-sources MANIFEST (the integration CONTRACT): knowledge/index/search_sources.txt, one line
`<label> <idx_path> <docmap_path> <tier>`. Producers (nx_library_harvest_v2, nx_research_grow) just WRITE
their indexes -- they do NOT know about the search engine. This registrar DISCOVERS them. The federated
searcher CONSUMES the manifest -- it does NOT know about producers. Three decoupled stages talk only through
the manifest artifact = proper integration, no tight coupling. Adding an index source = it gets discovered
here; the searcher needs zero changes. expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_search_inverted_persist.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
| 9 | const SR_MAGIC_1024: i64 = 1024 |
| 11 | const SR_MAXSHARD: i64 = 4096 |
functions
| 13 | func sr_puts(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 1: main |
| 14 | func sr_num(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;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 |
| 15 | func sr_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i } |
| 16 | func sr_catnum(dst: *u8, off: i64, v: i64) -> i64 called by 1: main |
| 23 | func sr_exists(path: *u8) -> i64 |
| 30 | func sr_emit(fd: i64, label: *u8, idx: *u8, docmap: *u8, tier: *u8) -> i64 |
| 42 | func main() -> i64 |