code wiki / (root) / nx_gen_ui_emit.nx

nx_gen_ui_emit.nx

buildroot/runtime/nx_gen_ui_emit.nx

41508 B317 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_ui_emit.nx -- EMITS the /gen companion app page (elara_ui.html) from DATA (knowledge/gen_ui.conf). gen G19 (2026-08-30, operator: "we should always be emitting our uis and web pages from the first byte up -- make sure /gen isnt handcrafted"). The served page was a hand-authored file since seq264; this organ now OWNS it: every string, default, endpoint, cadence and theme token is a conf row, the structure lives here, and nx_gen_ui_gate proves (a) two emits are byte-identical, (b) required behaviours are present, (c) a missing key REFUSES by name and writes nothing, (d) the SERVED file is the EMITTED file. Output carries the NX-DERIVED stamp so no reader mistakes it for authored content. ASCII source: non-ASCII glyphs are HTML entities or JS String.fromCodePoint. nx_gen_ui_emit <conf> <out.html> exit: 0 emitted | 2 usage | 3 REFUSED (missing keys, named) | 4 unreadable/write-fail Contract symbol: gu_emit. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_gen_ui_emit.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ue_w sys_write ue_len sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ue_parse gu_emit ue_get ue_eq ue_len ↻ ue_local_href ue_w ↻ ue_options ue_w ↻ sys_write ↻ ue_text ue_w ↻ sys_write ↻

structs

none

consts

12const UE_MAXKEYS: i64 = 160
13const UE_CONF_CAP: i64 = 65536
14const UE_MISS_CAP: i64 = 4096
15const UE_MODE_FILE: i64 = 420
16const UE_EXIT_OK: i64 = 0
17const UE_EXIT_USAGE: i64 = 2
18const UE_EXIT_REFUSED: i64 = 3
19const UE_EXIT_IO: i64 = 4
20const UE_CH_PIPE: i64 = 124
21const UE_CH_HASH: i64 = 35
22const UE_CH_NL: i64 = 10
23const UE_CH_CR: i64 = 13
24const UE_CH_COMMA: i64 = 44

functions

26func ue_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ue_wue_get
27func ue_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, ue_len(s)); return 0 }
28func ue_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 }
called by 1: ue_get
31func ue_parse(buf: *u8, n: i64, keys: *i64, vals: *i64) -> i64
called by 1: main
61func ue_get(buf: *u8, keys: *i64, vals: *i64, nk: i64, key: *u8, miss: *i64, mlist: *u8) -> *u8
called by 1: gu_emit calls 2: ue_eque_len
79func ue_text(fd: i64, s: *u8) -> i64
called by 1: gu_emit calls 2: ue_wsys_write
88func ue_local_href(s: *u8) -> i64
called by 1: gu_emit
107func ue_options(fd: i64, csv: *u8) -> i64
called by 1: gu_emit calls 2: ue_wsys_write
124func gu_emit(fd: i64, buf: *u8, keys: *i64, vals: *i64, nk: i64, miss: *i64, mlist: *u8) -> i64
263func main(argc: i64, argv: *i64) -> i64