code wiki / _hdl_build / nx_vroom_emit.nx
nx_vroom_emit.nx
buildroot/runtime/_hdl_build/nx_vroom_emit.nx
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
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
structs
| none |
consts
| 15 | const VE_MAGIC_262144: i64 = 262144 |
| 16 | const VE_MAGIC_4096: i64 = 4096 |
| 18 | const VE_LOG: *u8 = "knowledge/status/vroom_emit.log" |
| 19 | const SRC_HTML: *u8 = "sites/nishifamily/video/index.html" |
| 20 | const SRC_JS: *u8 = "sites/nishifamily/video/app.js" |
| 21 | const OUT_DIR: *u8 = "knowledge/staging/video" |
| 22 | const OUT_HTML: *u8 = "knowledge/staging/video/index.html" |
| 23 | const OUT_JS: *u8 = "knowledge/staging/video/app.js" |
| 25 | const SELF_OLD: *u8 = "selfTile.className = \"tile\"" |
| 26 | const SELF_NEW: *u8 = "selfTile.className = \"tile self\"" |
| 27 | const CSS_MARK: *u8 = "</style>" |
| 28 | const 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
| 30 | func 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 } |
| 31 | func 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 } |
| 32 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 34 | func find_sub(hay: *u8, n: i64, needle: *u8) -> i64 |
| 47 | func 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 |
| 49 | func replace_one(src: *u8, n: i64, oldp: *u8, newp: *u8, out: *u8) -> i64 |
| 58 | func write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 65 | func main() -> i64 |