code wiki / _hdl_build / nx_nofloat_serve_gate.nx

nx_nofloat_serve_gate.nx

buildroot/runtime/_hdl_build/nx_nofloat_serve_gate.nx

7898 B157 linesdepth 10pulls 21 transitivereach 0 importersview sourcekind gate/prooftopic nofloat
docsdependenciesstructsconstsfunctions

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

nx_nofloat_serve_core.nx nx_nofloat_serve_gate.nx

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

main sg_puts sys_now_ms sys_mmap sys_clock_gettime_mono nsv_init sys_now_ms ↻ nsv_log sys_write nf_pool nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sys_mmap ↻ nsv_load_meta sys_mmap ↻ nsv_log ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻

structs

none

consts

none

functions

12func 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 }
called by 2: sg_checkmain
13func 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
14func sg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: sg_hassg_reqmain
16func sg_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: sg_slen
29func sg_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: sg_puts
36func sg_req(req: *u8, resb: *u8) -> i64
called by 1: main calls 2: nsv_handlesg_slen
40func main() -> i64