pub struct WasmMemory {
pub index: u32,
pub initial_pages: u32,
pub max_pages: Option<u32>,
pub shared: bool,
pub memory64: bool,
}Expand description
WASM linear memory specification
Fields§
§index: u32Memory index
initial_pages: u32Initial size in pages (64KB each)
max_pages: Option<u32>Maximum size in pages (if specified)
Whether memory is shared (requires threads proposal)
memory64: bool#1209: whether this memory is 64-bit-INDEXED (the memory64 proposal,
(memory i64 ...)) rather than the default 32-bit index type. No
codegen path in this crate handles an i64 memory index — data-segment
offsets are decoded i32.const-only (silently DROPPING an
i64.const-offset segment) and every address-materialization path
assumes a 32-bit address, so a memory64 module compiled today produces
EXECUTABLE, WRONG code rather than failing to compile. This flag is
consumed by refuse_memory64_module in synth-cli to turn that into a
loud decline at decode time, the #1046 pattern.
Implementations§
Source§impl WasmMemory
impl WasmMemory
Trait Implementations§
Source§impl Clone for WasmMemory
impl Clone for WasmMemory
Source§fn clone(&self) -> WasmMemory
fn clone(&self) -> WasmMemory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WasmMemory
impl RefUnwindSafe for WasmMemory
impl Send for WasmMemory
impl Sync for WasmMemory
impl Unpin for WasmMemory
impl UnsafeUnpin for WasmMemory
impl UnwindSafe for WasmMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more