code wiki / _hdl_build / nx_browser_view_serve.nx
nx_browser_view_serve.nx
buildroot/runtime/_hdl_build/nx_browser_view_serve.nx
about
nx_browser_view_serve.nx -- surface the nishi browser's render as a web page reachable from the
WINDOWS browser via WSL2 localhost-forwarding (identical path to the :8097 media daemon, nx_torrent_daemon).
Pure COMPOSITION, no new server machinery: the sovereign HTTP primitive (nx_http_server) + static file
serving (nx_pages_static, sets image/png). Bind 0.0.0.0 -> accept -> read_request -> serve _offc/<file>.
Route bare "/" -> the viewer page (nx_pages_serve_file 404s on "/" by design). Both imports pull only
nx_syscalls.nx (no nx_syscalls_x86_64 dup), so the composite assembles.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_http.nxnx_http_server.nxnx_pages_static.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
| 12 | const BV_PORT: i64 = 8099 |
| 13 | const BV_BACKLOG: i64 = 64 |
| 14 | const BV_REQ_CAP: i64 = 16384 |
| 15 | const BV_RESP_CAP: i64 = 4194304 // 4 MB (a 1000x1000 PNG fits with room to spare) |
functions
| 18 | func bv_serve_one(cfd: i64) -> i64 |
| 41 | func main() -> i64 |