#[no_mangle]
pub unsafe extern "C" fn wasm_instance_new(
store: &mut wasm_store_t,
wasm_module: &wasm_module_t,
imports: *const wasm_extern_vec_t,
result: Option<&mut *mut wasm_trap_t>,
) -> Option<Box<wasm_instance_t>>
Expand description
Instantiates the wasm_module_t
with the given list of imports
.
- The instantiation process follows the Wasm core specification.
- Stores a
wasm_trap_t
inout
in case the instantiation failed.
Wraps Instance::exports
.
§Safety
It is the caller’s responsibility not to alias the wasm_instance_t
with its underlying, internal WasmStoreRef
.