code wiki / _hdl_build / nx_vroom_emit.nx

nx_vroom_emit.nx

buildroot/runtime/_hdl_build/nx_vroom_emit.nx

7929 B132 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic vroom
docsdependenciesstructsconstsfunctions

about

nx_vroom_emit.nx -- RUNG 0 of making the LIVE /video/ client NISHI-EMITTED (operator 2026-06-23: "why do we have javascript, we were nishi ecosystem all the way -- organ emits the client (SSOT)"). The live family room = sites/nishifamily/video/{index.html, app.js} (app.js = the browser-primitive SHIM driving the Nishi WASM core -- browser glue is allowed, but it must be ORGAN-EMITTED, not hand- authored). This organ OWNS the emit: it reads the source, applies the camera-mirror fix IN the emit, and writes the deployable client to knowledge/staging/video/. Edit the organ -> emit -> deploy (vault organs) -> verify LIVE via nx_live_verify (find THIS marker in the served bytes). No more hand-editing the deployed JS; the organ is the SSOT of the transform. RUNG 0 fix = SELF-VIEW MIRROR (the reported camera-flip): mark the self tile (class "tile self") + a CSS rule mirrors ONLY the self <video> (selfie feel); the SENT frame stays un-mirrored (remote correct). RUNG 1 (next) = TX flip-toggle + inter-frame coding into the emit. GREEN = emitted output carries the fix. Evidence -> knowledge/status/vroom_emit.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_vroom_emit.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_mkdir sys_mmap ew sys_write sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit find_sub slen replace_one find_sub ↻ slen ↻ put write_file sys_openat_wr sys_write ↻ sys_close ↻ en sys_mmap ↻ sys_write ↻ sys_openat_append sys_close ↻

structs

none

consts

15const VE_MAGIC_262144: i64 = 262144
16const VE_MAGIC_4096: i64 = 4096
18const VE_LOG: *u8 = "knowledge/status/vroom_emit.log"
19const SRC_HTML: *u8 = "sites/nishifamily/video/index.html"
20const SRC_JS: *u8 = "sites/nishifamily/video/app.js"
21const OUT_DIR: *u8 = "knowledge/staging/video"
22const OUT_HTML: *u8 = "knowledge/staging/video/index.html"
23const OUT_JS: *u8 = "knowledge/staging/video/app.js"
25const SELF_OLD: *u8 = "selfTile.className = \"tile\""
26const SELF_NEW: *u8 = "selfTile.className = \"tile self\""
27const CSS_MARK: *u8 = "</style>"
28const CSS_INJECT: *u8 = " /* nishi-emit: self-view mirror (selfie feel); sent frame stays un-mirrored */\n .tile.self video, .tile.self canvas { transform: scaleX(-1); }\n</style>"

functions

30func ew(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
31func en(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
32func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: find_subreplace_one
34func find_sub(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: replace_onemain calls 1: slen
47func put(dst: *u8, off: i64, s: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[off+i]=s[i]; i=i+1 } return off+n }
called by 1: replace_one
49func replace_one(src: *u8, n: i64, oldp: *u8, newp: *u8, out: *u8) -> i64
called by 1: main calls 3: find_subslenput
58func write_file(path: *u8, buf: *u8, n: i64) -> i64
65func main() -> i64