code wiki / (root) / nx_wasm_data.nx

nx_wasm_data.nx

buildroot/runtime/nx_wasm_data.nx

7953 B185 linesdepth 4pulls 7 transitivereach 14 importersview sourcekind librarytopic wasm
docsdependenciesstructsconstsfunctions

about

Static-data layout for the WAT backend. Addresses are module-relative, never host pointers.

dependencies 4 imports · 5 importers

nx_syscalls.nx nx_types.nx nx_ir.nx nx_outbuf.nx nx_wasm_data.nx nx_wasm.nx nx_wasm_call_operands_t143.nx nx_wasm_layout_lib.nx nx_wasm_pair_extension_gate.nx nx_wasm_static_bounds_gate.nx

imports: nx_syscalls.nxnx_types.nxnx_ir.nxnx_outbuf.nx

imported by: nx_wasm.nxnx_wasm_call_operands_t143.nxnx_wasm_layout_lib.nxnx_wasm_pair_extension_gate.nxnx_wasm_static_bounds_gate.nx

structs

none

consts

7const WD_PAGE: i64 = 65536 // WebAssembly memory page.
8const WD_CELL: i64 = 8 // Nishi scalar global alignment.
9const WD_GLOBAL_STRIDE: i64 = 80 // IR global pool ABI.
10const WD_MAX_BYTES: i64 = 4294967296 // wasm32 address space.

functions

15func wd_fail(msg: *u8) -> i64
28func wd_parse_pages(s: *u8) -> i64
43func wd_prepare_checked(m: *Module,pages: i64,shared: i64,limit_bytes: i64) -> i64
89func wd_prepare(m: *Module,pages: i64,shared: i64) -> i64
108func wd_address(id: i64) -> i64
113func wd_hex(o: *OutBuf,v: i64) -> i64
121func wd_emit(m: *Module,o: *OutBuf) -> i64
142func wd_i32(o: *OutBuf,value: i64) -> i64
150func wd_emit_shared(m: *Module,o: *OutBuf) -> i64