nx_catalog_id_lookup.nx
buildroot/runtime/nx_catalog_id_lookup.nx
about
nx_catalog_id_lookup.nx -- string-id <-> sealed-enum bridge.
CAPABILITY_COMPLETENESS: FULL (for shipped catalog enums;
new catalog entries register via the lookup-table extension
pattern documented inline)
Phase 1.5 of NISHI_NSFW_LESSONS_AND_ADDITIVE_CATALOG.md:
bridges the JSONL catalog files (nxc2/seed/modesty_profiles.jsonl
+ nxc2/seed/object_specs.jsonl) -- where each row's `id` field
is a human-readable string -- with the runtime sealed-enum
integers that nx_modesty_profile + nx_object_spec use.
Without this bridge, every JSONL-loader would need to embed
the same string -> enum mapping. With it, ONE place owns the
canonical mapping; Phase 2 loaders compose against it.
The lookup is OPEN-FORM lookup (no fancy hash table) because
the catalogs are small (16 modesty + 23 object specs). When
the catalog grows past a few hundred entries, swap to FNV-1a
hash table; the API stays.
genealogy_id: substrate_additive_catalog_phase_1_5_2026_05_16
lineage_id: nx_catalog_id_lookup_v1
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_modesty_profile.nxnx_object_spec.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
| none |
functions
| 36 | func _idlk_streq(a: *u8, n: nx_int, lit: *u8) -> nx_int |
| 55 | func nx_modesty_id_to_enum(id_buf: *u8, id_len: nx_int) -> nx_int |
| 112 | func nx_modesty_enum_to_id(profile_id: nx_int) -> *u8 called by 1: main |
| 134 | func nx_object_spec_id_to_enum(id_buf: *u8, id_len: nx_int) -> nx_int |
| 169 | func nx_part_id_to_enum(name: *u8, len: nx_int) -> nx_int |
| 240 | func main() -> nx_int |