Skip to main content

WasmEdge_VMRegisterModuleFromImportWithAlias

Function WasmEdge_VMRegisterModuleFromImportWithAlias 

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromImportWithAlias(
    Cxt: *mut WasmEdge_VMContext,
    ModuleName: WasmEdge_String,
    ImportCxt: *const WasmEdge_ModuleInstanceContext,
) -> WasmEdge_Result
Expand description

Register a module instance into the VM under the given alias name.

Similar to WasmEdge_VMRegisterModuleFromImport(), but registers the module under the provided ModuleName instead of the module’s own name.

\param Cxt the WasmEdge_VMContext. \param ModuleName the WasmEdge_String of module name to register as. \param ImportCxt the WasmEdge_ModuleInstanceContext to register.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.