code wiki / (root) / nx_acquire_license_lib.nx

nx_acquire_license_lib.nx

buildroot/runtime/nx_acquire_license_lib.nx

6093 B153 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic acquire
docsdependenciesstructsconstsfunctions

about

nx_acquire_license_lib.nx -- the LICENCE-URL DERIVATION as a LIBRARY. WHY A LIB, and it is the same unblock nx_licgate_lib records: an organ with main() CANNOT be imported (double-main), so a gate over a CLI can only fork the deployed binary. That fork is a boundary the mutation harness is blind across -- every mutant comes back NOT-REACHED and the gate returns a clean GREEN that reads exactly like a proof while proving nothing. Splitting the pure core out is what makes the logic mutation-testable at all. FAIL-CLOSED ON AN UNKNOWN HOST. Guessing a licence location for a host whose layout we have not established would fetch some other file and pin its digest as though it were a licence: a fabricated fact wearing a cryptographic pin, which is worse than no licence at all. Unknown -> -1. DERIVING A URL IS NOT EVIDENCE. This produces CANDIDATES. A row reaches evidence=READ only once those bytes are fetched, stored and pinned. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_acquire_license_lib.nx nx_acquire_license.nx nx_acquire_license_gate.nx

imports: nx_syscalls.nx

imported by: nx_acquire_license.nxnx_acquire_license_gate.nx

structs

none

consts

18const AL_URLCAP: i64 = 512
19const AL_SLASH: i64 = 47
20const AL_NUL: i64 = 0
21const AL_CAND_N: i64 = 4
23const AL_HOST_UNKNOWN: i64 = 0
24const AL_HOST_GITHUB: i64 = 1
25const AL_HOST_HF: i64 = 2
26const AL_HOST_HF_DATASET: i64 = 3

functions

28func al_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: alc_puts
30func al_cat(d: *u8, o: i64, s: *u8) -> i64
called by 1: al_host
37func al_starts(s: *u8, p: *u8) -> i64
called by 1: al_host
48func al_streq(a: *u8, b: *u8) -> i64
called by 2: mainalg_is
61func al_cand(i: i64) -> *u8
71func al_host(url: *u8) -> i64
called by 2: mainmain calls 2: al_startsal_cat
81func al_seg(url: *u8, skip: i64, want: i64, out: *u8, cap: i64) -> i64
111func aq_license_url(url: *u8, cand: i64, out: *u8, cap: i64) -> i64
148func al_host_name(h: i64) -> *u8