Function wasmedge_sys::ffi::WasmEdge_VMGetRegisteredModule
source · pub unsafe extern "C" fn WasmEdge_VMGetRegisteredModule(
Cxt: *const WasmEdge_VMContext,
ModuleName: WasmEdge_String
) -> *const WasmEdge_ModuleInstanceContext
Expand description
Get the registered module in VM by the module name.
After registering a WASM module into the VM context, developers can call
this function to get the module instance by the module name. The returned
module instance context links to the context owned by the VM context, and
the caller should NOT call the WasmEdge_ModuleInstanceDelete
to
destroy it.
This function is thread-safe.
\param Cxt the WasmEdge_VMContext. \param ModuleName the module name WasmEdge_String.
\returns pointer to the module instance context. NULL if not found.