Function wasmedge_sys::ffi::WasmEdge_VMRegisterModuleFromBuffer
source · pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromBuffer(
Cxt: *mut WasmEdge_VMContext,
ModuleName: WasmEdge_String,
Buf: *const u8,
BufLen: u32
) -> WasmEdge_Result
Expand description
Register and instantiate WASM into the store in VM from a buffer.
Load a WASM module from a buffer, and register all exported instances and instantiate them into the store into the VM with their exported name and module name.
This function is thread-safe.
\param Cxt the WasmEdge_VMContext which contains the store. \param ModuleName the WasmEdge_String of module name for all exported instances. \param Buf the buffer of WASM binary. \param BufLen the length of the buffer.
\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage
for the error
message.