code wiki / _hdl_build / nx_game_publish.nx

nx_game_publish.nx

buildroot/runtime/_hdl_build/nx_game_publish.nx

13585 B265 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic game
docsdependenciesstructsconstsfunctions

about

nx_game_publish.nx -- the AUTO game/test PUBLISHER (operator: "we should be publishing these tests so i can tell you where they are -- get us to an auto s-class-exceed publishing"). It AUTO-DISCOVERS (no hand-list) every game + every test gate and PUBLISHES a discoverable dashboard so the operator can find them: - GAMES: scans knowledge/specs/ (getdents64) for game_*.spec, reads each title + detects engine. - TESTS: scans knowledge/status/ for gate logs (contain "verdict="), reads each LIVE verdict. - HOSTED: the games already playable in the browser (served by nx_arcade_serve). Outputs (the published LOCATIONS): - web_assets/_game_build/games.html (the human dashboard; served at http://localhost:7700/games) - knowledge/status/published_catalog.tsv (the machine manifest) Re-run anytime to RE-PUBLISH current state (idempotent, law#10) -> "auto". SELF-GATE (no args, the nx_sov_build_run way): PUBLISH-GATE GREEN iff it discovered >=2 games + >=3 tests and wrote both outputs -> knowledge/status/game_publish.log. S-class-exceed is MEASURED in a separate bench rung (sovereignty + zero-config auto-discovery + inline test-proof are the differentiators vs itch.io/ GitHub-Pages; no exceed asserted here -- no-wave law). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_game_publish.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_wr gp_w sys_write sys_exit gp_c sys_mmap sys_write ↻ gp_html_link_row gp_w ↻ gp_man gp_w ↻ gp_c ↻ gp_scan_games sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen dirent_name gp_starts gp_ends gp_len gp_catpath gp_read sys_openat_rd ↻ sys_read sys_close gp_contains gp_match gp_title gp_match ↻ gp_html_row3 gp_w ↻ gp_man ↻ sys_close ↻ sys_mmap ↻ gp_scan_tests sys_openat_rd ↻ sys_mmap ↻ sys_getdents64 ↻

structs

none

consts

18const K_MAGIC_65536: i64 = 65536
19const K_MAGIC_131072: i64 = 131072

functions

21func gp_w(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 }
22func gp_c(fd: i64, c: i64) -> i64 { let b: *u8 = sys_mmap(8); b[0] = c as u8; sys_write(fd, b, 1); return 0 }
called by 2: gp_manmain calls 2: sys_mmapsys_write
27func gp_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
28func gp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: gp_ends
29func gp_starts(s: *u8, pre: *u8) -> i64
called by 1: gp_scan_games
34func gp_ends(s: *u8, suf: *u8) -> i64
called by 2: gp_scan_gamesgp_scan_tests calls 1: gp_len
42func gp_read(path: *u8, buf: *u8, cap: i64) -> i64
51func gp_match(buf: *u8, pos: i64, len: i64, pat: *u8) -> i64
56func gp_contains(buf: *u8, len: i64, pat: *u8) -> i64
called by 2: gp_scan_gamesgp_scan_tests calls 1: gp_match
62func gp_last_verdict(buf: *u8, len: i64) -> i64
called by 1: gp_scan_tests calls 1: gp_match
73func gp_title(buf: *u8, len: i64, out: *u8) -> i64
called by 1: gp_scan_games calls 1: gp_match
97func gp_catpath(dir: *u8, name: *u8, out: *u8) -> i64
106func gp_html_row3(fd: i64, a: *u8, b: *u8, c: *u8) -> i64
called by 1: gp_scan_games calls 1: gp_w
120func gp_man(fd: i64, kind: *u8, name: *u8, ev: *u8, loc: *u8) -> i64
126func gp_scan_games(hf: i64, mf: i64) -> i64
164func gp_scan_tests(hf: i64, mf: i64, greenp: *i64) -> i64
204func main() -> i64