code wiki / _hdl_build / nx_vizsla_serve.nx

nx_vizsla_serve.nx

buildroot/runtime/_hdl_build/nx_vizsla_serve.nx

13390 B336 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind servicetopic 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)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_write vs_slen vs_match vs_slen ↻ sys_mmap vs_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close vs_handle vs_match ↻ sys_mmap ↻ vs_bodyfield vs_slen ↻ vs_keyeq vs_valid_tid vs_run_action sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve_clean sys_close ↻ sys_execve sys_exit sys_wait4 vs_redirect vs_cat vs_pathtid vs_render sys_mmap ↻ vs_today sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mmap ↻ vs_civil

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
called by 2: vs_todayvs_render calls 1: sys_mmap
42func vs_match(req: *u8, rn: i64, pat: *u8) -> i64
called by 2: vs_handlemain calls 1: vs_slen
50func vs_valid_tid(s: *u8) -> i64
called by 1: vs_handle
68func vs_pathtid(req: *u8, rn: i64, out: *u8) -> i64
called by 1: vs_handle
86func vs_keyeq(req: *u8, rn: i64, p: i64, key: *u8, kl: i64) -> i64
called by 1: vs_bodyfield
95func vs_bodyfield(req: *u8, rn: i64, key: *u8, out: *u8) -> i64
called by 1: vs_handle calls 2: vs_slenvs_keyeq
125func vs_civil(z0: i64, out: *i64) -> i64
called by 1: vs_today
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
called by 1: vs_handle calls 1: vs_cat
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