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

Function WasmEdge_VMAsyncRunWasmFromBytes

lib/api/wasmedge.cpp:3354–3369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3352}
3353
3354WASMEDGE_CAPI_EXPORT WasmEdge_Async *WasmEdge_VMAsyncRunWasmFromBytes(
3355 WasmEdge_VMContext *Cxt, const WasmEdge_Bytes Bytes,
3356 const WasmEdge_String FuncName, const WasmEdge_Value *Params,
3357 const uint32_t ParamLen) noexcept {
3358 try {
3359 auto ParamPair = genParamPair(Params, ParamLen);
3360 if (Cxt) {
3361 return new WasmEdge_Async(Cxt->VM.asyncRunWasmFile(
3362 genSpan(Bytes.Buf, Bytes.Length), genStrView(FuncName),
3363 ParamPair.first, ParamPair.second));
3364 }
3365 } catch (...) {
3366 handleCAPIError();
3367 }
3368 return nullptr;
3369}
3370
3371WASMEDGE_CAPI_EXPORT WasmEdge_Async *WasmEdge_VMAsyncRunWasmFromASTModule(
3372 WasmEdge_VMContext *Cxt, const WasmEdge_ASTModuleContext *ASTCxt,

Callers 1

Calls 4

genParamPairFunction · 0.85
genSpanFunction · 0.85
genStrViewFunction · 0.85
handleCAPIErrorFunction · 0.85

Tested by

no test coverage detected