code wiki / _hdl_build / nx_algo_registry_migrate.nx
nx_algo_registry_migrate.nx
buildroot/runtime/_hdl_build/nx_algo_registry_migrate.nx
about
nx_algo_registry_migrate.nx -- migrate specs/algo_registry/<algo>/meta.json (the 3,282 JSON algorithm cards)
into ONE sovereign seg_store (knowledge/store/algo-registry-), key = algo name, value = meta.json bytes
(byte-faithful, content-addressed). The cards total ~1.4MB, so the writer is sized to hold them all in a
SINGLE segment -> one commit (no multi-commit segid collision). Self-verifies: re-opens the store, round-trips
a known card byte-for-byte + checks the count key. This is the "get the JSON onto the nishi ecosystem" win;
repointing the consumer (nx_bundle_gen) + retiring the derived JSON is the NEXT (gated) step.
expect_exit: 0 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 AM_MAGIC_131072: i64 = 131072 |
| 11 | const AM_MAGIC_6291456: i64 = 6291456 |
| 12 | const AM_MAGIC_1024: i64 = 1024 |
| 48 | const AM_PREFIX: *u8 = "knowledge/store/algo-registry-" as *u8 |
functions
| 14 | func am_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 am_putn(v: i64) -> i64 |
| 26 | func am_itoa(v: i64, out: *u8) -> i64 |
| 34 | func am_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 called by 1: main |
| 40 | func am_metapath(nm: *u8, out: *u8) -> i64 |
| 50 | func main() -> i64 |