code wiki / (root) / nx_catalog_id_lookup.nx

nx_catalog_id_lookup.nx

buildroot/runtime/nx_catalog_id_lookup.nx

15695 B290 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_modesty_profile.nx nx_object_spec.nx nx_catalog_id_lookup.nx

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

main nx_modesty_id_to_enum _idlk_streq nx_modesty_enum_to_id _idlk_streq ↻ nx_object_spec_id_to_enum _idlk_streq ↻ nx_part_id_to_enum _idlk_streq ↻

structs

none

consts

none

functions

36func _idlk_streq(a: *u8, n: nx_int, lit: *u8) -> nx_int
55func nx_modesty_id_to_enum(id_buf: *u8, id_len: nx_int) -> nx_int
called by 1: main calls 1: _idlk_streq
112func nx_modesty_enum_to_id(profile_id: nx_int) -> *u8
called by 1: main
134func nx_object_spec_id_to_enum(id_buf: *u8, id_len: nx_int) -> nx_int
called by 1: main calls 1: _idlk_streq
169func nx_part_id_to_enum(name: *u8, len: nx_int) -> nx_int
called by 1: main calls 1: _idlk_streq
240func main() -> nx_int