code wiki / _hdl_build / nx_algo_registry.nx
nx_algo_registry.nx
buildroot/runtime/_hdl_build/nx_algo_registry.nx
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
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
structs
| none |
consts
| 10 | const AR_MAGIC_3000: i64 = 3000 |
| 12 | const AR_PREFIX: *u8 = "knowledge/store/algo-registry-" as *u8 |
functions
| 14 | func 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 } |
| 15 | func ar_putn(v: i64) -> i64 |
| 25 | func ar_atoi(s: *u8, n: i64) -> i64 called by 1: ar_count |
| 31 | func ar_has(b: *u8, n: i64, needle: *u8, nl: i64) -> i64 called by 1: main |
| 43 | func ar_count(h: *i64) -> i64 |
| 50 | func ar_get(h: *i64, name: *u8, outlen: *i64) -> *u8 |
| 58 | func ar_register(prefix: *u8, name: *u8, json: *u8, jlen: i64) -> i64 |
| 63 | func main() -> i64 |