MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_ExecutorCreate

Function WasmEdge_ExecutorCreate

lib/api/wasmedge.cpp:2105–2129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2103// >>>>>>>> WasmEdge executor functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2104
2105WASMEDGE_CAPI_EXPORT WasmEdge_ExecutorContext *
2106WasmEdge_ExecutorCreate(const WasmEdge_ConfigureContext *ConfCxt,
2107 WasmEdge_StatisticsContext *StatCxt) noexcept {
2108 try {
2109 if (ConfCxt) {
2110 if (StatCxt) {
2111 return toExecutorCxt(new WasmEdge::Executor::Executor(
2112 ConfCxt->Conf, fromStatCxt(StatCxt)));
2113 } else {
2114 return toExecutorCxt(new WasmEdge::Executor::Executor(ConfCxt->Conf));
2115 }
2116 } else {
2117 if (StatCxt) {
2118 return toExecutorCxt(new WasmEdge::Executor::Executor(
2119 WasmEdge::Configure(), fromStatCxt(StatCxt)));
2120 } else {
2121 return toExecutorCxt(
2122 new WasmEdge::Executor::Executor(WasmEdge::Configure()));
2123 }
2124 }
2125 } catch (...) {
2126 handleCAPIError();
2127 return nullptr;
2128 }
2129}
2130
2131WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_ExecutorInstantiate(
2132 WasmEdge_ExecutorContext *Cxt, WasmEdge_ModuleInstanceContext **ModuleCxt,

Callers 6

TestContextMethod · 0.85
TESTFunction · 0.85
registerModuleFunction · 0.85
instantiateModuleFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 2

ConfigureClass · 0.85
handleCAPIErrorFunction · 0.85

Tested by 6

TestContextMethod · 0.68
TESTFunction · 0.68
registerModuleFunction · 0.68
instantiateModuleFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68