code wiki / (root) / nx_pagerender_lib.nx

nx_pagerender_lib.nx

buildroot/runtime/nx_pagerender_lib.nx

7033 B174 linesdepth 5pulls 10 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_html_to_text.nx nx_css_color_decode.nx nx_paint_solid_rect.nx nx_paint_text.nx nx_paint_fb_ascii_dump.nx nx_gate_verdict.nx nx_pagerender_lib.nx nx_render_sweep.nx

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

24const PR_OK: i64 = 0
25const PR_SKIP_ABSENT: i64 = 10
26const PR_SKIP_TINY: i64 = 11
27const PR_FAIL_TEXT: i64 = 20
28const PR_FAIL_MARKER: i64 = 21
29const PR_FAIL_LINE: i64 = 30
30const PR_FAIL_BLANK: i64 = 40
31const PR_FAIL_DUMP: i64 = 41
34const PR_MIN_HTML: i64 = 64 // below this a "page" is an error stub, not a document
35const PR_MIN_TEXT: i64 = 16
36const PR_MIN_LINE: i64 = 4
37const PR_MIN_LIT: i64 = 16 // a real glyph row lights dozens; 16 is the floor for NON-BLANK
38const PR_FB_W: i64 = 480 // 80 cols x 6px
39const PR_FB_H: i64 = 128 // 16 rows x 8px
40const PR_LINE_MAX: i64 = 76 // chars of the first non-empty line that fit the framebuffer
41const PR_RGBA: i64 = 4
42const PR_LIT_THRESHOLD: i64 = 128 // a subpixel counts as lit above half range
43const PR_NL: i64 = 10
44const PR_SPACE: i64 = 32
47const PR_ST_SLOTS: i64 = 8
48const PR_ST_HTML: i64 = 0
49const PR_ST_TEXT: i64 = 1
50const PR_ST_PAINTED: i64 = 2
51const PR_ST_LIT: i64 = 3
52const PR_ST_TOTALPX: i64 = 4
53const PR_ST_RASTER: i64 = 5
54const PR_ST_MARKED: i64 = 6 // 1 = the marker was CHECKED, 0 = deliberately skipped
55const PR_WORD: i64 = 8

functions

57func pr_stats() -> *i64
called by 1: main calls 1: sys_mmap
64func pr_contains(hay: *u8, hay_len: i64, needle: *u8) -> i64
called by 1: pr_render
85func pr_marker_is_skip(m: *u8) -> i64
called by 1: pr_render
93func pr_render(html_path: *u8, marker: *u8, out_path: *u8, st: *i64) -> i64
164func pr_code_name(c: i64) -> *u8
called by 1: main