nx_games_js.nx
buildroot/runtime/nx_games_js.nx
about
nx_games_js.nx -- LIB (no main): the /games portal's shared emit helpers plus the whole client
script block. Split out of nx_games_page.nx 2026-08-10.
WHY THE SPLIT. Two reasons, in order of merit:
1. SINGLE RESPONSIBILITY (rule 9). The page organ authors document structure, tokens and copy;
this organ authors game behaviour. One file was doing both and had grown past 31 KB.
2. It also happens to fix a transport ceiling: the estate's nx_fs_write lane could not carry a
31 KB payload (eight verified attempts, artifact unchanged every time), while both halves of
the split carry first try. That is a side benefit, NOT the justification -- a split made only
to dodge a transport limit would be a hack; this one is the decomposition the file was owed.
SUDOKU IS NO LONGER HERE (2026-08-10). It became a sovereign NishiLang module compiled to
WebAssembly (nx_sudoku_wasm) and served at /games/sudoku, where the page holds no game logic at
all. Its JS, its bank parser and the GJS_ROW record constant went with it: keeping a second
implementation of the same ruleset in JavaScript would have been the duplicate-ruler defect.
Connect Four and Tic-Tac-Toe are still JS here and are owed the same treatment.
license_tier: ORIGINAL
genealogy_id: nishi_games_portal
lineage_id: nx_games_js_v2
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_games_page.nx
structs
| none |
consts
| none |
functions
| 24 | func gm_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 32 | func gm_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 49 | func gm_card(dst: *u8, off: i64, name: *u8, note: *u8, href: *u8, state: i64) -> i64 calls 1: gm_cat |
| 66 | func gjs_scripts(h: *u8, w0: i64) -> i64 calls 1: gm_cat |