| 3308 | } |
| 3309 | |
| 3310 | WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_VMRunWasmFromASTModule( |
| 3311 | WasmEdge_VMContext *Cxt, const WasmEdge_ASTModuleContext *ASTCxt, |
| 3312 | const WasmEdge_String FuncName, const WasmEdge_Value *Params, |
| 3313 | const uint32_t ParamLen, WasmEdge_Value *Returns, |
| 3314 | const uint32_t ReturnLen) noexcept { |
| 3315 | try { |
| 3316 | auto ParamPair = genParamPair(Params, ParamLen); |
| 3317 | return wrap( |
| 3318 | [&]() { |
| 3319 | return Cxt->VM.runWasmFile(*fromASTModCxt(ASTCxt), |
| 3320 | genStrView(FuncName), ParamPair.first, |
| 3321 | ParamPair.second); |
| 3322 | }, |
| 3323 | [&](auto &&Res) { fillWasmEdge_ValueArr(*Res, Returns, ReturnLen); }, |
| 3324 | Cxt, ASTCxt); |
| 3325 | } catch (...) { |
| 3326 | return handleCAPIError(); |
| 3327 | } |
| 3328 | } |
| 3329 | |
| 3330 | WASMEDGE_CAPI_EXPORT WasmEdge_Async *WasmEdge_VMAsyncRunWasmFromFile( |
| 3331 | WasmEdge_VMContext *Cxt, const char *Path, const WasmEdge_String FuncName, |
nothing calls this directly
no test coverage detected