code wiki / _hdl_build / nx_ws_board_html.nx
nx_ws_board_html.nx
buildroot/runtime/_hdl_build/nx_ws_board_html.nx
about
nx_ws_board_html.nx -- WMS rung M2.5: the VIEWABLE board (Language-Export HAL last-mile).
module: nishi-core.wms.ws_board_html
capability: CORE_COMPUTE (a Nishi-EMITTED last-mile HTML view of the M2 derived board)
WHAT THIS CLOSES: the M2 charter says the live board "REPLACES the stale THREADS
worksheet". nx_ws_board renders to stdout + a log -- not a VIEWABLE artifact. This
additive organ produces the viewable form WITHOUT violating sovereign/NO-BLEED: the
HTML is the genuine last-mile wire format (HTML is to a browser what a syscall is to
the OS) and EVERY byte is EMITTED BY this Nishi organ -- never hand-authored, never a
node/playwright dependency. This is the wheeler flip the Language-Export HAL encodes
(nx_lang_export): Nishi is the TRUTH; the emitted artifact is a verified OUTPUT.
TRUTH-PRESERVING: the table is derived by calling the SAME wb_board_p that the M2 gate
proved correct -- the HTML cannot disagree with the board (single source of truth, no
re-derivation). And it honors the board's refusals: if wb_board_p returns a negative
WB_* code (incomplete registry / torn reflog), this organ emits a REFUSED banner page,
NOT a wrong table. A silently-wrong viewable board would defeat the whole point.
REUSE / lineage: wb_board_p / WB_ROWW / WB_MAXEMP / WB_INCOMPLETE / WB_TORNREFLOG
(nx_ws_board, WMS-M2); fa_cat / fa_catn / fa_appendz (nx_framed_append, WMS-R0b -- the
one-buffer-one-locked-write discipline for the evidence channel); the byte-emit + wfile
idiom mirrors nx_lang_export (Language-Export HAL). Additive: no organ modified.
Sovereign: imports only the WMS/HAL stack + nx_syscalls (no gcc/openssl/node).
license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_ws_board.nxnx_framed_append.nxnx_syscalls.nx
imported by: nx_ws_board_html_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 30 | const WBH_OUT: *u8 = "web_assets/_ws_build/ws_board.html" |
| 31 | const WBH_LOG: *u8 = "knowledge/status/ws_board_html.log" |
| 32 | const WBH_RECCAP: i64 = 512 |
| 33 | const WBH_HTMLCAP: i64 = 65536 // bounded HTML buffer (no magic number) |
| 36 | const WBH_TABLE: i64 = 1 // a real per-empire table was emitted |
| 37 | const WBH_REFUSED: i64 = 2 // a REFUSED banner was emitted (board refused) |
functions
| 39 | func wbh_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 43 | func wbh_cat(dst: *u8, off: i64, s: *u8) -> i64 { return fa_cat(dst, off, s) } |
| 44 | func wbh_catn(dst: *u8, off: i64, v: i64) -> i64 { return fa_catn(dst, off, v) } |
| 47 | func wbh_wfile(path: *u8, buf: *u8, n: i64) -> i64 |
| 62 | func wbh_head(out: *u8, off: i64) -> i64 |
| 79 | func wbh_emit_p(prefix: *u8, refpath: *u8, outpath: *u8, status_out: *i64) -> i64 |
| 142 | func wbh_emit(refpath: *u8, status_out: *i64) -> i64 |
| 147 | func wbh_emit_log(emitcode: i64, empires: i64, total: i64) -> i64 |
| 160 | func wbh_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 161 | func wbh_pn(v: i64) -> i64 |
| 174 | func main() -> i64 |