code wiki / _hdl_build / nx_arcade_serve.nx
nx_arcade_serve.nx
buildroot/runtime/_hdl_build/nx_arcade_serve.nx
about
nx_arcade_serve.nx -- SOVEREIGN static HTTP server for the Nishi arcade (replaces the
python host hack). Pure Nishi: socket/bind/listen/accept + read-file-from-disk + serve,
no node/python/3rd-party. Serves the canvas page + the Nishi-COMPILED game wasm so the
operator plays in a browser via a fully sovereign toolchain (nx->wat(nxc2)->wasm(Nishi
nx_wat_compiler)->Nishi server). The only non-Nishi piece is the browser + the ~40-line
canvas shim (the named last-mile debt -> future Nishi browser). Built native by Nishi's
own toolchain. Run from repo root. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_native_config.nxnx_geo_places.nxnx_geo_route.nxnx_geo_distance.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
| 13 | const K_MAGIC_42360000: i64 = 42360000 |
| 14 | const K_MAGIC_71060000: i64 = 71060000 |
| 15 | const K_MAGIC_41824000: i64 = 41824000 |
| 16 | const K_MAGIC_71412000: i64 = 71412000 |
| 17 | const K_MAGIC_41763000: i64 = 41763000 |
| 18 | const K_MAGIC_72685000: i64 = 72685000 |
| 19 | const K_MAGIC_40712800: i64 = 40712800 |
| 20 | const K_MAGIC_74006000: i64 = 74006000 |
| 21 | const K_MAGIC_40735700: i64 = 40735700 |
| 22 | const K_MAGIC_74172400: i64 = 74172400 |
| 23 | const K_MAGIC_40217000: i64 = 40217000 |
| 24 | const K_MAGIC_74763000: i64 = 74763000 |
| 25 | const K_MAGIC_39952600: i64 = 39952600 |
| 26 | const K_MAGIC_75165200: i64 = 75165200 |
| 27 | const K_MAGIC_39290400: i64 = 39290400 |
| 28 | const K_MAGIC_76612200: i64 = 76612200 |
| 29 | const K_MAGIC_38900000: i64 = 38900000 |
| 30 | const K_MAGIC_77036000: i64 = 77036000 |
| 31 | const K_MAGIC_43661000: i64 = 43661000 |
| 32 | const K_MAGIC_70255000: i64 = 70255000 |
| 33 | const K_MAGIC_42652000: i64 = 42652000 |
| 34 | const K_MAGIC_73757000: i64 = 73757000 |
| 35 | const K_MAGIC_42886000: i64 = 42886000 |
| 36 | const K_MAGIC_78878000: i64 = 78878000 |
| 37 | const K_MAGIC_40273000: i64 = 40273000 |
| 38 | const K_MAGIC_76884000: i64 = 76884000 |
| 39 | const K_MAGIC_40440600: i64 = 40440600 |
| 40 | const K_MAGIC_79995900: i64 = 79995900 |
| 41 | const K_MAGIC_39745800: i64 = 39745800 |
| 42 | const K_MAGIC_75546600: i64 = 75546600 |
| 43 | const K_MAGIC_37540700: i64 = 37540700 |
| 44 | const K_MAGIC_77436000: i64 = 77436000 |
| 45 | const K_MAGIC_36850800: i64 = 36850800 |
| 46 | const K_MAGIC_76285900: i64 = 76285900 |
| 47 | const K_MAGIC_7700: i64 = 7700 |
| 48 | const K_MAGIC_8192: i64 = 8192 |
| 49 | const K_MAGIC_1024: i64 = 1024 |
| 50 | const K_MAGIC_65536: i64 = 65536 |
| 51 | const K_MAGIC_4096: i64 = 4096 |
functions
| 53 | func as_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 called by 1: as_path |
| 64 | func as_path(req: *u8, n: i64, out: *u8) -> i64 calls 1: as_find |
| 78 | func as_eq(a: *u8, b: *u8) -> i64 |
| 84 | func as_starts(s: *u8, pre: *u8) -> i64 |
| 89 | func as_wstr(buf: *u8, off: i64, s: *u8) -> i64 |
| 94 | func as_wn(buf: *u8, off: i64, v: i64) -> i64 |
| 104 | func as_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: as_qval |
| 106 | func as_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: as_gaz |
| 113 | func as_key(buf: *u8, off: i64, k: *u8) -> i64 calls 1: as_wstr |
| 122 | func as_wsn(buf: *u8, off: i64, v: i64) -> i64 calls 1: as_wn |
| 130 | func as_qval(path: *u8, key: *u8, out: *u8) -> i64 calls 1: as_slen |
| 158 | func as_gaz(nl: *u8, glat: *i64, glon: *i64) -> i64 calls 1: as_cat |
| 198 | func as_name_at(nl: *u8, idx: i64) -> *u8 |
| 205 | func as_edge(adj: *i64, n: i64, a: i64, b: i64, glat: *i64, glon: *i64) -> i64 calls 1: geo_distance_m |
| 212 | func as_serve(cfd: i64, path: *u8, ctype: *u8) -> i64 |
| 231 | func as_games_catalog(buf: *u8) -> i64 |
| 253 | func as_serve_buf(cfd: i64, buf: *u8, blen: i64, ctype: *u8) -> i64 |
| 265 | func main() -> i64 |