nx_html_emit.nx
buildroot/runtime/nx_html_emit.nx
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
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nx
imported by: nx_dashboard.nxnx_html_emit_test.nx
structs
| none |
consts
| 190 | const NX_HTML_BADGE_GOOD: nx_int = 0 |
| 191 | const NX_HTML_BADGE_DRIFT: nx_int = 1 |
| 192 | const NX_HTML_BADGE_BROKEN: nx_int = 2 |
| 193 | const NX_HTML_BADGE_NEUTRAL: nx_int = 3 |
| 194 | const NX_HTML_BADGE_N_KINDS: nx_int = 4 |
functions
| 41 | func _html_write_z(fd: nx_int, s: *u8) -> nx_int |
| 45 | func _html_write_byte(fd: nx_int, b: nx_int) -> nx_int |
| 51 | func _html_write_i64(fd: nx_int, n: nx_int) -> nx_int |
| 63 | func _html_write_escaped_z(fd: nx_int, s: *u8) -> nx_int |
| 90 | func nx_html_doc_open(fd: nx_int, title: *u8) -> nx_int |
| 100 | func nx_html_doc_close(fd: nx_int) -> nx_int |
| 107 | func nx_html_h1(fd: nx_int, text: *u8) -> nx_int |
| 114 | func nx_html_h2(fd: nx_int, text: *u8) -> nx_int |
| 123 | func nx_html_p(fd: nx_int, text: *u8) -> nx_int |
| 136 | func nx_html_table_open(fd: nx_int) -> nx_int |
| 140 | func nx_html_table_close(fd: nx_int) -> nx_int |
| 145 | func nx_html_thead_open(fd: nx_int) -> nx_int |
| 149 | func nx_html_thead_close(fd: nx_int) -> nx_int |
| 153 | func nx_html_th(fd: nx_int, label: *u8) -> nx_int |
| 161 | func nx_html_tr_open(fd: nx_int) -> nx_int |
| 165 | func nx_html_tr_close(fd: nx_int) -> nx_int |
| 169 | func nx_html_td_int(fd: nx_int, n: nx_int) -> nx_int |
| 176 | func nx_html_td_text(fd: nx_int, s: *u8) -> nx_int |
| 196 | func nx_html_badge(fd: nx_int, kind: nx_int, label: *u8) -> nx_int |
| 212 | func nx_html_pre_open(fd: nx_int) -> nx_int |
| 216 | func nx_html_pre_close(fd: nx_int) -> nx_int |