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

Function WasmEdge_VMAsyncRunWasmFromASTModule

lib/api/wasmedge.cpp:3371–3386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3369}
3370
3371WASMEDGE_CAPI_EXPORT WasmEdge_Async *WasmEdge_VMAsyncRunWasmFromASTModule(
3372 WasmEdge_VMContext *Cxt, const WasmEdge_ASTModuleContext *ASTCxt,
3373 const WasmEdge_String FuncName, const WasmEdge_Value *Params,
3374 const uint32_t ParamLen) noexcept {
3375 try {
3376 auto ParamPair = genParamPair(Params, ParamLen);
3377 if (Cxt && ASTCxt) {
3378 return new WasmEdge_Async(
3379 Cxt->VM.asyncRunWasmFile(*fromASTModCxt(ASTCxt), genStrView(FuncName),
3380 ParamPair.first, ParamPair.second));
3381 }
3382 } catch (...) {
3383 handleCAPIError();
3384 }
3385 return nullptr;
3386}
3387
3388WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_VMLoadWasmFromFile(
3389 WasmEdge_VMContext *Cxt, const char *Path) noexcept {

Callers 1

TESTFunction · 0.85

Calls 3

genParamPairFunction · 0.85
genStrViewFunction · 0.85
handleCAPIErrorFunction · 0.85

Tested by 1

TESTFunction · 0.68