Function wasmedge_sys::ffi::WasmEdge_VMInstantiate
source · pub unsafe extern "C" fn WasmEdge_VMInstantiate(
Cxt: *mut WasmEdge_VMContext
) -> WasmEdge_Result
Expand description
Instantiate the validated WASM module in the VM context.
This is the third step to invoke a WASM function step by step.
After validating a WASM module in the VM context, You can call this function
to instantiate it. And you can then call WasmEdge_VMExecute
for invoking
the exported function in this WASM module.
After calling this function, a new module instance is instantiated, and the
old one will be destroyed.
This function is thread-safe.
\param Cxt the WasmEdge_VMContext.
\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage
for the error
message.