code wiki / _hdl_build / nx_game_publish.nx
nx_game_publish.nx
buildroot/runtime/_hdl_build/nx_game_publish.nx
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
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
structs
| none |
consts
| 18 | const K_MAGIC_65536: i64 = 65536 |
| 19 | const K_MAGIC_131072: i64 = 131072 |
functions
| 21 | func 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 } |
| 22 | func 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 } |
| 27 | func gp_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 28 | func 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 |
| 29 | func gp_starts(s: *u8, pre: *u8) -> i64 called by 1: gp_scan_games |
| 34 | func gp_ends(s: *u8, suf: *u8) -> i64 |
| 42 | func gp_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 51 | func gp_match(buf: *u8, pos: i64, len: i64, pat: *u8) -> i64 |
| 56 | func gp_contains(buf: *u8, len: i64, pat: *u8) -> i64 |
| 62 | func gp_last_verdict(buf: *u8, len: i64) -> i64 |
| 73 | func gp_title(buf: *u8, len: i64, out: *u8) -> i64 |
| 97 | func gp_catpath(dir: *u8, name: *u8, out: *u8) -> i64 |
| 106 | func gp_html_row3(fd: i64, a: *u8, b: *u8, c: *u8) -> i64 |
| 113 | func gp_html_link_row(fd: i64, title: *u8, engine: *u8, url: *u8) -> i64 |
| 120 | func gp_man(fd: i64, kind: *u8, name: *u8, ev: *u8, loc: *u8) -> i64 |
| 126 | func gp_scan_games(hf: i64, mf: i64) -> i64 |
| 164 | func gp_scan_tests(hf: i64, mf: i64, greenp: *i64) -> i64 |
| 204 | func main() -> i64 |