code wiki / _hdl_build / nx_arcade_serve.nx

nx_arcade_serve.nx

buildroot/runtime/_hdl_build/nx_arcade_serve.nx

22932 B431 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind service
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_native_config.nx nx_geo_places.nx nx_geo_route.nx nx_geo_distance.nx nx_arcade_serve.nx

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

main sys_mmap sys_socket sys_write sys_exit sys_setsockopt sys_bind sys_listen

structs

none

consts

13const K_MAGIC_42360000: i64 = 42360000
14const K_MAGIC_71060000: i64 = 71060000
15const K_MAGIC_41824000: i64 = 41824000
16const K_MAGIC_71412000: i64 = 71412000
17const K_MAGIC_41763000: i64 = 41763000
18const K_MAGIC_72685000: i64 = 72685000
19const K_MAGIC_40712800: i64 = 40712800
20const K_MAGIC_74006000: i64 = 74006000
21const K_MAGIC_40735700: i64 = 40735700
22const K_MAGIC_74172400: i64 = 74172400
23const K_MAGIC_40217000: i64 = 40217000
24const K_MAGIC_74763000: i64 = 74763000
25const K_MAGIC_39952600: i64 = 39952600
26const K_MAGIC_75165200: i64 = 75165200
27const K_MAGIC_39290400: i64 = 39290400
28const K_MAGIC_76612200: i64 = 76612200
29const K_MAGIC_38900000: i64 = 38900000
30const K_MAGIC_77036000: i64 = 77036000
31const K_MAGIC_43661000: i64 = 43661000
32const K_MAGIC_70255000: i64 = 70255000
33const K_MAGIC_42652000: i64 = 42652000
34const K_MAGIC_73757000: i64 = 73757000
35const K_MAGIC_42886000: i64 = 42886000
36const K_MAGIC_78878000: i64 = 78878000
37const K_MAGIC_40273000: i64 = 40273000
38const K_MAGIC_76884000: i64 = 76884000
39const K_MAGIC_40440600: i64 = 40440600
40const K_MAGIC_79995900: i64 = 79995900
41const K_MAGIC_39745800: i64 = 39745800
42const K_MAGIC_75546600: i64 = 75546600
43const K_MAGIC_37540700: i64 = 37540700
44const K_MAGIC_77436000: i64 = 77436000
45const K_MAGIC_36850800: i64 = 36850800
46const K_MAGIC_76285900: i64 = 76285900
47const K_MAGIC_7700: i64 = 7700
48const K_MAGIC_8192: i64 = 8192
49const K_MAGIC_1024: i64 = 1024
50const K_MAGIC_65536: i64 = 65536
51const K_MAGIC_4096: i64 = 4096

functions

53func as_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64
called by 1: as_path
64func as_path(req: *u8, n: i64, out: *u8) -> i64
calls 1: as_find
78func as_eq(a: *u8, b: *u8) -> i64
84func as_starts(s: *u8, pre: *u8) -> i64
89func as_wstr(buf: *u8, off: i64, s: *u8) -> i64
94func as_wn(buf: *u8, off: i64, v: i64) -> i64
called by 3: as_wsnas_serveas_serve_buf calls 1: sys_mmap
104func 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
106func as_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: as_gaz
113func as_key(buf: *u8, off: i64, k: *u8) -> i64
calls 1: as_wstr
122func as_wsn(buf: *u8, off: i64, v: i64) -> i64
calls 1: as_wn
130func as_qval(path: *u8, key: *u8, out: *u8) -> i64
calls 1: as_slen
158func as_gaz(nl: *u8, glat: *i64, glon: *i64) -> i64
calls 1: as_cat
198func as_name_at(nl: *u8, idx: i64) -> *u8
205func as_edge(adj: *i64, n: i64, a: i64, b: i64, glat: *i64, glon: *i64) -> i64
calls 1: geo_distance_m
212func as_serve(cfd: i64, path: *u8, ctype: *u8) -> i64
231func as_games_catalog(buf: *u8) -> i64
253func as_serve_buf(cfd: i64, buf: *u8, blen: i64, ctype: *u8) -> i64
265func main() -> i64