code wiki / _hdl_build / nx_model_get_lib.nx

nx_model_get_lib.nx

buildroot/runtime/_hdl_build/nx_model_get_lib.nx

5486 B155 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic model
docsdependenciesstructsconstsfunctions

about

nx_model_get_lib.nx -- LIB: the pure decision half of G9 mg_fetch (model acquisition). Everything here is offline-testable by nx_model_get_gate; the network half lives in runtime/nx_model_get.nx and COMPOSES the incumbents (nx_https_fetch_range windows, nx_sha256 streaming via the fetch unit, wp_hexenc/wp_streq from nx_weights_pull). This lib deliberately re-implements NO transport and NO crypto: it parses, validates and decides. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_model_get_lib.nx nx_model_get.nx nx_model_get_gate.nx

imports: nx_syscalls.nx

imported by: nx_model_get.nxnx_model_get_gate.nx

structs

none

consts

none

functions

8func mg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
9func mg_lc(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c }
10func mg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i]; o=o+1; i=i+1} return o }
14func mg_hex_norm(s: *u8, out: *u8) -> i64
called by 2: mainmain calls 1: mg_lc
34func mg_dest_ok(name: *u8) -> i64
called by 2: mainmain
46func mg_join(root: *u8, name: *u8, out: *u8) -> i64
called by 2: mainmain calls 1: mg_cat
55func mg_find_ci(buf: *u8, n: i64, needle: *u8) -> i64
69func mg_parse_uint(buf: *u8, n: i64, pos: i64) -> i64
85func mg_content_range_total(hdr: *u8, n: i64) -> i64
102func mg_content_length(hdr: *u8, n: i64) -> i64
called by 2: mg_probemain calls 2: mg_lcmg_parse_uint
124func mg_conf_val(conf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64
called by 2: mainmain calls 1: mg_slen