code wiki / (root) / nx_html_emit.nx

nx_html_emit.nx

buildroot/runtime/nx_html_emit.nx

6967 B218 linesdepth 3pulls 3 transitivereach 3 importersview sourcekind librarytopic html
docsdependenciesstructsconstsfunctions

about

nx_html_emit.nx -- minimal substrate-native HTML5 writer. Layer 5 of the sovereign-log roadmap: dashboard visibility. Renders query-layer projections to a tail-able HTML page. Pure NishiLang, fd-write based, no template engine. Per the user's "live fire testing + see how its testing, innovating, improving" directive: this primitive is what makes the substrate's audit data VISIBLE without leaving NishiLang. Caller composes a page from these primitives like Lego bricks: nx_html_doc_open(fd, "Batch 42 audit") nx_html_h1(fd, "Pool utilization") nx_html_table_open(fd, "n_scenes | n_violations | outfit_band") nx_html_tr3_int(fd, n_scenes, n_violations, outfit_band) nx_html_table_close(fd) nx_html_doc_close(fd) HTML5 minimal: <!doctype html> + <meta charset="utf-8">, no CSS dependency (inline classes only). Output is human-readable and browser-renderable end-to-end. genealogy_id: html5_w3c_2014 + tufte_dashboards lineage_id: substrate_html_emit_v1

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_html_emit.nx nx_dashboard.nx nx_html_emit_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nx

imported by: nx_dashboard.nxnx_html_emit_test.nx

structs

none

consts

190const NX_HTML_BADGE_GOOD: nx_int = 0
191const NX_HTML_BADGE_DRIFT: nx_int = 1
192const NX_HTML_BADGE_BROKEN: nx_int = 2
193const NX_HTML_BADGE_NEUTRAL: nx_int = 3
194const NX_HTML_BADGE_N_KINDS: nx_int = 4

functions

41func _html_write_z(fd: nx_int, s: *u8) -> nx_int
45func _html_write_byte(fd: nx_int, b: nx_int) -> nx_int
51func _html_write_i64(fd: nx_int, n: nx_int) -> nx_int
63func _html_write_escaped_z(fd: nx_int, s: *u8) -> nx_int
90func nx_html_doc_open(fd: nx_int, title: *u8) -> nx_int
100func nx_html_doc_close(fd: nx_int) -> nx_int
107func nx_html_h1(fd: nx_int, text: *u8) -> nx_int
114func nx_html_h2(fd: nx_int, text: *u8) -> nx_int
123func nx_html_p(fd: nx_int, text: *u8) -> nx_int
136func nx_html_table_open(fd: nx_int) -> nx_int
140func nx_html_table_close(fd: nx_int) -> nx_int
145func nx_html_thead_open(fd: nx_int) -> nx_int
149func nx_html_thead_close(fd: nx_int) -> nx_int
153func nx_html_th(fd: nx_int, label: *u8) -> nx_int
161func nx_html_tr_open(fd: nx_int) -> nx_int
165func nx_html_tr_close(fd: nx_int) -> nx_int
169func nx_html_td_int(fd: nx_int, n: nx_int) -> nx_int
176func nx_html_td_text(fd: nx_int, s: *u8) -> nx_int
196func nx_html_badge(fd: nx_int, kind: nx_int, label: *u8) -> nx_int
212func nx_html_pre_open(fd: nx_int) -> nx_int
called by 1: main calls 1: _html_write_z
216func nx_html_pre_close(fd: nx_int) -> nx_int
called by 1: main calls 1: _html_write_z