code wiki / _hdl_build / nx_vizsla_serve.nx

nx_vizsla_serve.nx

buildroot/runtime/_hdl_build/nx_vizsla_serve.nx

13800 B341 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_serve.nx -- NISHI VIZSLA: the sovereign HTTP transport that makes the first-party UI LIVE in the Nishi browser. Operator 2026-06-22: manage relationships IN the first party nishi browser, privacy-first. Binds 127.0.0.1 ONLY (never exposed), no third-party, your data never leaves the box. GET /<tid> -> fork nx_vizsla_render -> serve that tenant's sovereign 0-JS page (GET / -> elderwesto) POST /v/submit -> read the form body -> fork nx_vizsla_action submit -> 303 redirect back to GET /<tid> Socket accept loop is the proven gallery_serve idiom (fork-per-conn, reap). A `handle <base> <reqfile>` CLI mode runs the router over a request read from a file (gateable without socket timing). tid validated [A-Za-z0-9_-] = no path traversal. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_vizsla_serve.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

10const K_MAGIC_719468: i64 = 719468
11const K_MAGIC_146097: i64 = 146097
12const K_MAGIC_146096: i64 = 146096
13const K_MAGIC_1460: i64 = 1460
14const K_MAGIC_36524: i64 = 36524
15const K_MAGIC_86400: i64 = 86400
16const K_MAGIC_65536: i64 = 65536
17const K_MAGIC_1048576: i64 = 1048576
18const K_MAGIC_18097: i64 = 18097

functions

20func vs_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
22func vs_cat(dst: *u8, off: i64, s: *u8) -> i64
28func vs_catn(dst: *u8, off: i64, v: i64) -> i64
42func vs_match(req: *u8, rn: i64, pat: *u8) -> i64
50func vs_valid_tid(s: *u8) -> i64
68func vs_pathtid(req: *u8, rn: i64, out: *u8) -> i64
86func vs_keyeq(req: *u8, rn: i64, p: i64, key: *u8, kl: i64) -> i64
95func vs_bodyfield(req: *u8, rn: i64, key: *u8, out: *u8) -> i64
125func vs_civil(z0: i64, out: *i64) -> i64
143func vs_today(out: *u8) -> i64
157func vs_readall(path: *u8, szp: *i64) -> *u8
172func vs_render(base: *u8, tid: *u8, rbuf: *u8) -> i64
211func vs_redirect(tid: *u8, rbuf: *u8) -> i64
220func vs_run_action(base: *u8, tid: *u8, action: *u8, body: *u8) -> i64
244func vs_handle(req: *u8, rn: i64, base: *u8, rbuf: *u8) -> i64
276func main(argc: i64, argv: *i64) -> i64