code wiki / _hdl_build / nx_gamesave_core.nx

nx_gamesave_core.nx

buildroot/runtime/_hdl_build/nx_gamesave_core.nx

1906 B41 linesdepth 0pulls 0 transitivereach 41 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_gamesave_core.nx -- the PURE serialize/validate core of the save law (seq1151 design-flaw fix). nx_gamesave.nx (file surface, native) and nx_wasm_craft.nx (save-image surface, wasm) each carried their OWN copy of the same mechanism -- little-endian i64<->bytes and the rolling xor-multiply-mask checksum fold -- because gs_save is file-syscall-coupled and wasm code cannot call it. That parallel re-derivation was the bug. This core is the ONE definition; each format's constants (seed, multiplier, mask, granularity) are PARAMETERS, so both existing on-disk formats stay byte-identical while the mechanism has a single home. PURE BY CONSTRUCTION: imports NOTHING, allocates NOTHING, touches no syscall -> wasm-dialect-clean. license_tier: ORIGINAL expect_exit: 0

dependencies 0 imports · 2 importers

nx_gamesave_core.nx nx_gamesave.nx nx_wasm_craft.nx

imports: none

imported by: nx_gamesave.nxnx_wasm_craft.nx

structs

none

consts

none

functions

12func gsc_put64(b: *u8, off: i64, v: i64) -> i64
called by 1: put64
18func gsc_get64(b: *u8, off: i64) -> i64
called by 1: get64
25func gsc_fold(h: i64, v: i64, mult: i64, mask: i64) -> i64
29func gsc_fold_bytes(h0: i64, b: *u8, n: i64, mult: i64, mask: i64) -> i64
36func gsc_fold_words(h0: i64, w: *i64, from: i64, to: i64, mult: i64, mask: i64) -> i64