pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromASTModule(
    Cxt: *mut WasmEdge_VMContext,
    ModuleName: WasmEdge_String,
    ASTCxt: *const WasmEdge_ASTModuleContext
) -> WasmEdge_Result
Expand description

Instantiate and register an AST Module into a named module instance in VM.

Load from the AST Module, and register all exported instances and instantiate them into the store in 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 ASTCxt the WasmEdge AST Module context generated by loader or compiler.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.