wasmi_c_api

Function wasm_module_new

source
#[no_mangle]
pub unsafe extern "C" fn wasm_module_new(
    store: &mut wasm_store_t,
    binary: &wasm_byte_vec_t,
) -> Option<Box<wasm_module_t>>
Expand description

Creates a new wasm_module_t for store from the given Wasm binary.

Returns None if creation of the wasm_module_t failed.

Wraps Module::new.

§Safety

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