wasmi_c_api

Function wasm_memory_new

source
#[no_mangle]
pub unsafe extern "C" fn wasm_memory_new(
    store: &mut wasm_store_t,
    mt: &wasm_memorytype_t,
) -> Option<Box<wasm_memory_t>>
Expand description

Creates a new wasm_memory_t from the given wasm_memorytype_t.

Wraps Memory::new.

§Safety

It is the caller’s responsibility not to alias the wasm_memory_t with its underlying, internal WasmStoreRef.