code wiki / _hdl_build / nx_nofloat_serve_gate.nx
nx_nofloat_serve_gate.nx
buildroot/runtime/_hdl_build/nx_nofloat_serve_gate.nx
about
nx_nofloat_serve_gate.nx -- gates the no-float LLM serve CORE in-process (pure-core+gate+daemon idiom:
no sockets here; synthetic HTTP requests straight into nsv_handle). Teeth:
T1 GET /health -> 200 + ok:1 (init fail-fast worked; model + both caches live)
T2 POST /gen "The capital of France is" (i32) -> 200 + READABLE " Paris. It is the" (real spaces --
the byte-level-BPE decode; raw pieces would read "GParis." with G-dot 0xC4 0xA0)
T3 arbitrary second prompt -> 200 + gen_tokens>0 + NO 0xC4 0xA0 byte pair anywhere (decode total)
T4 mode i8 on the France prompt -> 200 + contains "Paris" (fast mode serves)
T5 GET /nope -> 404 (router honest)
Requires /home/elderwesto/nx_stage/nx_real_model.gguf. expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_nofloat_serve_core.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
| 12 | func sg_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func sg_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } called by 1: main |
| 14 | func sg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 16 | func sg_has(buf: *u8, n: i64, needle: *u8) -> i64 |
| 29 | func sg_check(name: *u8, cond: i64) -> i64 |
| 36 | func sg_req(req: *u8, resb: *u8) -> i64 |
| 40 | func main() -> i64 |