code wiki / _hdl_build / nx_nishi_builder.nx

nx_nishi_builder.nx

buildroot/runtime/_hdl_build/nx_nishi_builder.nx

6028 B104 linesdepth 2pulls 2 transitivereach 29 importersview sourcekind librarytopic nishi
docsdependenciesstructsconstsfunctions

about

nx_nishi_builder.nx -- THE NISHI BUILDER: one universal, self-growing emitter catalog for the WHOLE ecosystem (websites, games, ads, ... -- "truly our builder"). Every emitter we build in any domain is TAUGHT here as DATA; the builder reads the catalog to emit, and a GROW loop generates new emitters and registers them -- so ONE builder keeps growing its emitters across ALL domains (the emitter-of-emitters, universal). Generalises the ad-domain registry with a DOMAIN axis. Append-only + idempotent (rule 10/13). One row: domain<TAB>kind<TAB>id<TAB>label<TAB>template domain in {ad, web, game, ...}; kind is domain-scoped (ad: size/theme/accent/animation; web: section/nav/ button/layout; game: sprite/tilemap/mechanic/entity); template = the emit DATA for that block. SOVEREIGNTY INVARIANT (the whole builder, by construction): nb_template_safe REJECTS any template carrying a <script or src= -> NO third-party JS, NO external fetch, in ANY domain. Functions take `path` (hermetic test). Registry: knowledge/registry/nishi_builder.tsv. (TSV now; seg-store = the doctrine follow-on.) license_tier: ORIGINAL

dependencies 1 imports · 16 importers

nx_syscalls.nx nx_nishi_builder.nx nx_ad_emitter_apply.nx nx_ad_nb_fold_gate.nx nx_brand_packs.nx nx_doc_member.nx nx_fin_member.nx nx_fin_member_gate.nx nx_food_stirfry_gate.nx nx_game_grow.nx nx_game_render.nx nx_game_render_gate.nx

diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_ad_emitter_apply.nxnx_ad_nb_fold_gate.nxnx_brand_packs.nxnx_doc_member.nxnx_fin_member.nxnx_fin_member_gate.nxnx_food_stirfry_gate.nxnx_game_grow.nxnx_game_render.nxnx_game_render_gate.nxnx_game_scaffold.nxnx_game_scaffold_gate.nxnx_nishi_builder_gate.nxnx_nishi_builder_seed.nxnx_web_render.nxnx_web_render_gate.nx

structs

none

consts

15const NB_PATH: *u8 = "knowledge/registry/nishi_builder.tsv"
16const NB_MAXTPL: i64 = 4096

functions

18func nb_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
19func nb_field(line: *u8, linelen: i64, idx: i64, out: *u8) -> i64
27func nb_present(path: *u8, domain: *u8, kind: *u8, id: *u8) -> i64
45func nb_register(path: *u8, domain: *u8, kind: *u8, id: *u8, label: *u8, template: *u8) -> i64
59func nb_count(path: *u8, domain: *u8, kind: *u8) -> i64
78func nb_lookup(path: *u8, domain: *u8, kind: *u8, id: *u8, out_template: *u8) -> i64
96func nb_template_safe(template: *u8) -> i64