nx_model_port_registry.nx
buildroot/runtime/nx_model_port_registry.nx
about
nx_model_port_registry.nx -- the STANDARD sovereign MODEL-PORT registry: ONE data-driven place that maps every
ported (or target) external model -> {family, source URL path, container format, loader organ, status}. Today the
ecosystem ports models by COPY-PASTE (nx_hifigan_*, nx_apertus_*, nx_qwen_*/gguf each hardcode their URL, shards,
shas, format inline) -- there is no queryable "what have we ported + how" backbone and no format->driver dispatch.
This organ is that backbone: a reusable LIBRARY (no main) the team + the generic port-driver query, so porting a
NEW model becomes "add a registry row + reuse the fetch/verify/parse/dequant/load organs", not a new copy-paste.
Provenance is LIAR-KILLED downstream (nx_model_port_registry_gate opens every entry's loader organ). Data-as-data
(rule 11/6): all model facts are table rows, no logic hardcodes a URL. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_model_port_registry_gate.nx
structs
| none |
consts
| 11 | const MPR_N: i64 = 4 // registry entries |
| 12 | const MPR_FIELDS: i64 = 6 // name, family, source, format, loader, status |
| 14 | const MPR_NAME: i64 = 0 |
| 15 | const MPR_FAMILY: i64 = 1 |
| 16 | const MPR_SOURCE: i64 = 2 |
| 17 | const MPR_FORMAT: i64 = 3 |
| 18 | const MPR_LOADER: i64 = 4 |
| 19 | const MPR_STATUS: i64 = 5 |
functions
| 21 | func mpr_streq(a: *u8, b: *u8) -> i64 |
| 28 | func mpr_count() -> i64 { return MPR_N } called by 1: main |
| 33 | func mpr_init(tbl: *i64) -> i64 called by 1: main |
| 66 | func mpr_get(tbl: *i64, idx: i64, field: i64) -> *u8 called by 1: main |
| 71 | func mpr_lookup(tbl: *i64, name: *u8) -> i64 |
| 82 | func mpr_driver_for(fmt: *u8) -> *u8 |
| 89 | func mpr_open(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |