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 175 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 · 30 importers

nx_gamesave_core.nx nx_craft_before_placement_t316.nx nx_gamesave.nx nx_movement_base_engine_t139.nx nx_wasm_craft.nx nx_wasm_craft_body_t137.nx nx_wasm_craft_contact_candidate.nx nx_wasm_craft_dunes_t70.nx nx_wasm_craft_gait_candidate.nx nx_wasm_craft_gait_candidate_t139. nx_wasm_craft_imported_body_t41.nx

diagram shows first 10 each side; +0 more imports, +20 more importers in the complete lists below.

imports: none

imported by: nx_craft_before_placement_t316.nxnx_gamesave.nxnx_movement_base_engine_t139.nxnx_wasm_craft.nxnx_wasm_craft_body_t137.nxnx_wasm_craft_contact_candidate.nxnx_wasm_craft_dunes_t70.nxnx_wasm_craft_gait_candidate.nxnx_wasm_craft_gait_candidate_t139.nxnx_wasm_craft_imported_body_t41.nxnx_wasm_craft_imported_body_t42.nxnx_wasm_craft_imported_body_t49.nxnx_wasm_craft_imported_t262.nxnx_wasm_craft_inspection_bounds_t181.nxnx_wasm_craft_inspection_distance_t218.nxnx_wasm_craft_inspection_t142.nxnx_wasm_craft_journal_index_t21.nxnx_wasm_craft_journal_index_t21_before_t44.nxnx_wasm_craft_lookup_candidate.nxnx_wasm_craft_move_t72.nxnx_wasm_craft_pre_inspection_t142.nxnx_wasm_craft_recovery_t20.nxnx_wasm_craft_relief_adopt_t143.nxnx_wasm_craft_relief_save_t143.nxnx_wasm_craft_relief_t143.nxnx_wasm_craft_residency_t44.nxnx_wasm_craft_turn_candidate_t139.nxnx_wasm_craft_visitors_canonical_t142.nxnx_wasm_craft_visitors_inspection_t142.nxnx_wasm_craft_visitors_t140.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
called by 1: gs_cksum
36func gsc_fold_words(h0: i64, w: *i64, from: i64, to: i64, mult: i64, mask: i64) -> i64