nx_langsem_lib.nx
buildroot/runtime/nx_langsem_lib.nx
about
nx_langsem_lib.nx -- the OTHER MODULE for nx_langsem_gate. It exists so the gate can ask a
question no single-file test can ask: when an importer assigns a static declared HERE, does THIS
module see the same storage, or did each module get its own copy?
That question was answered by accident on 2026-08-28 while extracting nx_worldpipe_core: the
extraction only works because nx_worldpipe's wp_init still assigns WP_SEED, WP_TEMP_BIAS,
WP_CONT_BIAS and WP_MOUNT_SCALE from OUTSIDE the module that declares them. It compiled and ran,
so the semantics hold -- but nothing in the estate ASSERTED it, which means the whole
shared-core/base-class pattern rested on a fact no gate protected. This lib is the other half of
that assertion.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_langsem_gate.nx
structs
| none |
consts
| 15 | const LS_CONST_ANSWER: i64 = 424242 |
functions
| 22 | func ls_get() -> i64 { return LS_SHARED } called by 1: main |
| 24 | func ls_set(v: i64) -> i64 { LS_SHARED = v; return 0 } called by 1: main |
| 26 | func ls_untouched() -> i64 { return LS_UNTOUCHED } called by 1: main |
| 29 | func ls_divmod_probe(a: i64, b: i64) -> i64 { return (a/b)*100 + (a%b) } called by 1: main |