wasmi_c_api

Function wasm_module_obtain

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

Obtains the wasm_module_t from the wasm_shared_module_t.

Returns None if the underlying engine of store and shared_module does not match.

§Safety

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

Wraps Module::clone (kinda).