code wiki / _hdl_build / nx_synth_serve_gate.nx
nx_synth_serve_gate.nx
buildroot/runtime/_hdl_build/nx_synth_serve_gate.nx
about
nx_synth_serve_gate.nx -- prove the Synth Studio is LIVE over real loopback HTTP: forks the server, then acts
as the browser. T1 GET /synth -> the studio page · T2 GET /synth/api/move?id=1 -> a real APNG · T3 POST
/synth/api/text2motion "say hello with a wave" -> a real APNG (neural chain runs in the request) · T4 POST
/synth/api/variant?sp=1&tv=1 -> a real PNG · T5 GET /synth/health -> ok. All served by sv_serve_conn.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_synth_serve.nxnx_connect.nxnx_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
| none |
functions
| 10 | func g(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 11 | func glen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 12 | func gcat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o+i]=s[i]; i=i+1} return o+i } |
| 13 | func gcatb(d: *u8, o: i64, s: *u8, n: i64) -> i64 { var i: i64=0; while i<n {d[o+i]=s[i]; i=i+1} return o+n } called by 1: greq_post |
| 14 | func gitoa(d: *u8, o: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; 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 q: i64=k-1; while q>=0{d[o]=t[q];o=o+1;q=q-1} return o } |
| 15 | func gfind(buf: *u8, n: i64, needle: *u8) -> i64 |
| 22 | func gpng(buf: *u8, n: i64) -> i64 called by 1: main |
| 27 | func glisten(port: i64) -> i64 |
| 38 | func gconnect(port: i64) -> i64 called by 2: greq_getgreq_post calls 5: sys_socketsys_set_socket_timeoutsys_mmapnx_connect_boundedsys_close |
| 48 | func gread(fd: i64, resp: *u8, cap: i64) -> i64 { var rn: i64=0; var go: i64=1; while go==1 { let r: i64=sys_read(fd,(resp as i64+rn) as *u8,cap-rn); if r<=0 {go=0} else {rn=rn+r; if rn>=cap {go=0}} } return rn } |
| 49 | func greq_get(port: i64, path: *u8, resp: *u8, cap: i64) -> i64 |
| 54 | func greq_post(port: i64, path: *u8, body: *u8, resp: *u8, cap: i64) -> i64 |
| 62 | func main() -> i64 |