| 3369 | } |
| 3370 | |
| 3371 | WASMEDGE_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 | |
| 3388 | WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_VMLoadWasmFromFile( |
| 3389 | WasmEdge_VMContext *Cxt, const char *Path) noexcept { |