nx_nxa_stream_emit.nx
buildroot/runtime/nx_nxa_stream_emit.nx
about
nx_nxa_stream_emit.nx -- SOVEREIGN STREAMING NXA viewer emitter. The embedded-base64 viewer
(nx_nxa_view_emit) proves small models; this one emits a page that FETCHES the .nxa over HTTP
with live progress, verifies every checksum in the browser (exact 64-bit rolling check done in
two 32-bit Number lanes -- no BigInt in the hot loop, ~10x faster on 9M-word files), auto-
detects the model's up axis, and renders MILLIONS of triangles in WebGL2 at device resolution.
This is the modern-polygon-count path: the file is served, not embedded, so size is unbounded.
The edge serves static files only up to ~4MB (measured: 4MB=200, 8MB=500), so big NXAs ship
as 4MB parts (<url>.pNN) the page refetches and reassembles -- transport chunking, the format
bytes untouched. nparts=1 means a single unsplit fetch.
INTEROP SYNC LAW: the page carries <meta name="nishi-nxa"> -- third-party browsers run the
emitted JS/WebGL2; the NISHI BROWSER reads the marker and renders the NXA NATIVELY instead.
usage: nx_nxa_stream_emit <out.html> <title> <nxa-url-base> <nparts> <total-bytes>
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
| 16 | const NSE_OUT_CAP: i64 = 1048576 |
functions
| 18 | func nse_ap(out: *u8, pos: i64, s: *u8) -> i64 called by 1: main |
| 24 | func nse_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 25 | func nse_num(v: i64) -> i64 |
| 37 | func main(argc: i64, argv: *i64) -> i64 |