code wiki / _hdl_build / nx_algo_registry.nx

nx_algo_registry.nx

buildroot/runtime/_hdl_build/nx_algo_registry.nx

4652 B97 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_algo_registry.nx -- the SOVEREIGN algorithm registry, replacing the shell subsystem (nx_algo_register.sh + bundle_lib.py + ...) that managed specs/algo_registry/<name>/meta.json. The card DATA already lives byte-faithful in the seg_store knowledge/store/algo-registry- (migrated by nx_algo_registry_migrate); this is the sovereign API over it: ar_count / ar_get / ar_register. Preserves the registration CAPABILITY (rule #25 never-strip) so the per-entry meta.json + the shell producers can RETIRE (debt-drop) with the feature kept, not lost. Self-gate: reads the REAL store (count + a known card byte-present) + proves ar_register round-trips on a FRESH throwaway store (no production pollution). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_seg_store.nx nx_syscalls.nx nx_algo_registry.nx

imports: nx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ar_puts sys_write ss_open ss_open2 sys_mmap ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_munmap ss_cat ↻ ss_loadfile sys_map_file sys_openat_rd ↻ sys_lseek ↻ sys_close ↻ ss_readall ↻ ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ↻ ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ss_r32 ↻ ssl_key_eq ss_r32 ↻ ss_r32 ↻

structs

none

consts

10const AR_MAGIC_3000: i64 = 3000
12const AR_PREFIX: *u8 = "knowledge/store/algo-registry-" as *u8

functions

14func ar_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 calls 1: sys_write
15func ar_putn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
25func ar_atoi(s: *u8, n: i64) -> i64
called by 1: ar_count
31func ar_has(b: *u8, n: i64, needle: *u8, nl: i64) -> i64
called by 1: main
43func ar_count(h: *i64) -> i64
called by 1: main calls 3: sys_mmapss_hgetar_atoi
50func ar_get(h: *i64, name: *u8, outlen: *i64) -> *u8
called by 1: main calls 2: sys_mmapss_hget
58func ar_register(prefix: *u8, name: *u8, json: *u8, jlen: i64) -> i64
63func main() -> i64