nx_pagerender_lib.nx
buildroot/runtime/nx_pagerender_lib.nx
about
nx_pagerender_lib.nx -- RENDER ONE PUBLISHED PAGE THROUGH THE SOVEREIGN PAINT SUBSTRATE, as a LIB.
WHY A LIB. The render proof lived inside nx_browser_render_own_test, which has a main() and therefore
cannot be imported. A sweep over every published board would have had to FORK that binary per page --
a boundary the mutation harness is blind across, and a second copy of the assertions waiting to drift
from the first. One ruler, two callers: the single-page CLI and the whole-fleet sweep now prove the
SAME code, so they cannot disagree about what "rendered" means.
WHAT IT ACTUALLY PROVES, stated so it is not mistaken for more: HTML on disk -> nx_html_to_text ->
the 5x7 bitmap font -> an RGBA framebuffer, asserted NON-BLANK, with the ASCII raster written out as
VISIBLE evidence rather than a boolean. It does NOT run the full CSS-cascade box layout; that is a
different rung and claiming it here would be the overclaim this substrate exists to avoid.
license_tier: ORIGINAL
dependencies 7 imports · 1 importers
imports: nx_syscalls.nxnx_html_to_text.nxnx_css_color_decode.nxnx_paint_solid_rect.nxnx_paint_text.nxnx_paint_fb_ascii_dump.nxnx_gate_verdict.nx
imported by: nx_render_sweep.nx
structs
| none |
consts
| 24 | const PR_OK: i64 = 0 |
| 25 | const PR_SKIP_ABSENT: i64 = 10 |
| 26 | const PR_SKIP_TINY: i64 = 11 |
| 27 | const PR_FAIL_TEXT: i64 = 20 |
| 28 | const PR_FAIL_MARKER: i64 = 21 |
| 29 | const PR_FAIL_LINE: i64 = 30 |
| 30 | const PR_FAIL_BLANK: i64 = 40 |
| 31 | const PR_FAIL_DUMP: i64 = 41 |
| 34 | const PR_MIN_HTML: i64 = 64 // below this a "page" is an error stub, not a document |
| 35 | const PR_MIN_TEXT: i64 = 16 |
| 36 | const PR_MIN_LINE: i64 = 4 |
| 37 | const PR_MIN_LIT: i64 = 16 // a real glyph row lights dozens; 16 is the floor for NON-BLANK |
| 38 | const PR_FB_W: i64 = 480 // 80 cols x 6px |
| 39 | const PR_FB_H: i64 = 128 // 16 rows x 8px |
| 40 | const PR_LINE_MAX: i64 = 76 // chars of the first non-empty line that fit the framebuffer |
| 41 | const PR_RGBA: i64 = 4 |
| 42 | const PR_LIT_THRESHOLD: i64 = 128 // a subpixel counts as lit above half range |
| 43 | const PR_NL: i64 = 10 |
| 44 | const PR_SPACE: i64 = 32 |
| 47 | const PR_ST_SLOTS: i64 = 8 |
| 48 | const PR_ST_HTML: i64 = 0 |
| 49 | const PR_ST_TEXT: i64 = 1 |
| 50 | const PR_ST_PAINTED: i64 = 2 |
| 51 | const PR_ST_LIT: i64 = 3 |
| 52 | const PR_ST_TOTALPX: i64 = 4 |
| 53 | const PR_ST_RASTER: i64 = 5 |
| 54 | const PR_ST_MARKED: i64 = 6 // 1 = the marker was CHECKED, 0 = deliberately skipped |
| 55 | const PR_WORD: i64 = 8 |
functions
| 57 | func pr_stats() -> *i64 |
| 64 | func pr_contains(hay: *u8, hay_len: i64, needle: *u8) -> i64 called by 1: pr_render |
| 85 | func pr_marker_is_skip(m: *u8) -> i64 called by 1: pr_render |
| 93 | func pr_render(html_path: *u8, marker: *u8, out_path: *u8, st: *i64) -> i64 called by 1: main calls 12: sys_mmapsys_read_filenx_html_to_textpr_marker_is_skippr_containsnx_framebuffer_init+6 |
| 164 | func pr_code_name(c: i64) -> *u8 called by 1: main |