code wiki / _hdl_build / nx_sudoku_html.nx

nx_sudoku_html.nx

buildroot/runtime/_hdl_build/nx_sudoku_html.nx

10334 B133 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic sudoku
docsdependenciesstructsconstsfunctions

about

nx_sudoku_html.nx -- SOVEREIGN packager: the sudoku wasm module -> a self-contained playable page. WHY NOT nx_wasm_html. That packager's shim is hardcoded for an f32 demo: it calls render(yc,ys,xc,xs) with rotation matrices, never calls init() or tick(), and pins the canvas at a fixed 512px with height:100vh -- so it cannot drive a turn-based game and cannot pass the estate's reflow bar on a phone. A packager is part of the contract, not a detail: a game whose interface is init/tick/render needs a shim that speaks it. THE SOVEREIGN BOUNDARY, stated plainly. The emitted JS is a CANVAS SHIM and nothing else -- the accepted foreign-browser last mile, the same position nx_wasm_html takes. It knows how to blit a framebuffer and how to turn a keypress or a touch into an integer. It contains NO rules, NO solver, NO generator, NO scoring and NO grid geometry: cell hit testing is an export (tap), so the page cannot drift out of sync with the board it is drawing. Every decision is NishiLang. RESPONSIVE BY CONSTRUCTION (WCAG 2.1 SC 1.4.10 Reflow @ 320px): the canvas carries no fixed pixel width. It is width:100% inside a max-width container with aspect-ratio:1, and image-rendering pixelated keeps the integer raster crisp when it scales. Taps are mapped back through the canvas rect, so the module always receives framebuffer coordinates whatever size it is displayed at. usage: nx_sudoku_html <in.wasm> <out.html> exit : 0 ok | 2 usage | 3 cannot read wasm license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_base64.nx nx_wasmfit.nx nx_sudoku_html.nx

imports: nx_syscalls.nxnx_base64.nxnx_wasmfit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hw sys_write sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close b64_encode b64_enc_char sys_openat_wr solved st_get clues st_get ↻ at tap tap_impl st_put render_impl rgb fillr

structs

none

consts

26const K_MAGIC_8192: i64 = 8192

functions

28func hw(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
30func main(argc: i64, argv: *i64) -> i64