wasmedge_sys::ffi

Function WasmEdge_PluginCreateModule

Source
pub unsafe extern "C" fn WasmEdge_PluginCreateModule(
    Cxt: *const WasmEdge_PluginContext,
    ModuleName: WasmEdge_String,
) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Create the module instance in the plug-in by the module name.

By giving the module name, developers can retrieve the module in the plug-in and create the module instance. The caller owns the object and should call WasmEdge_ModuleInstanceDelete to destroy it.

\param Cxt the WasmEdge_PluginContext to retrieve and create module. \param ModuleName the module name to retrieve.

\returns pointer to the module instance context, NULL if the module name not found in the plug-in or the plug-in is not valid.