Function wasmedge_sys::ffi::WasmEdge_ExecutorInstantiate
source · pub unsafe extern "C" fn WasmEdge_ExecutorInstantiate(
Cxt: *mut WasmEdge_ExecutorContext,
ModuleCxt: *mut *mut WasmEdge_ModuleInstanceContext,
StoreCxt: *mut WasmEdge_StoreContext,
ASTCxt: *const WasmEdge_ASTModuleContext
) -> WasmEdge_Result
Expand description
Instantiate an AST Module into a module instance.
Instantiate an AST Module, and return an instantiated module instance
context as the result. The caller owns the object and should call
WasmEdge_ModuleInstanceDelete
to destroy it. Developers can use the
WasmEdge_ModuleInstanceListFunction
,
WasmEdge_ModuleInstanceFindFunction
, etc. APIs to retrieve the exported
instances from the result module instance.
\param Cxt the WasmEdge_ExecutorContext to instantiate the module. \param [out] ModuleCxt the output WasmEdge_ModuleInstanceContext if succeeded. \param StoreCxt the WasmEdge_StoreContext to link the imports. \param ASTCxt the WasmEdge AST Module context generated by loader or compiler.
\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage
for the error
message.