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

Function validateModule

test/api/APIUnitTest.cpp:397–403  ·  view source on GitHub ↗

Helper function to validate wasm module.

Source from the content-addressed store, hash-verified

395
396// Helper function to validate wasm module.
397bool validateModule(const WasmEdge_ConfigureContext *Conf,
398 const WasmEdge_ASTModuleContext *Mod) {
399 WasmEdge_ValidatorContext *Validator = WasmEdge_ValidatorCreate(Conf);
400 WasmEdge_Result Res = WasmEdge_ValidatorValidate(Validator, Mod);
401 WasmEdge_ValidatorDelete(Validator);
402 return WasmEdge_ResultOK(Res);
403}
404
405// Helper function to register AST module.
406WasmEdge_ModuleInstanceContext *

Callers 1

TESTFunction · 0.85

Calls 3

WasmEdge_ValidatorCreateFunction · 0.85
WasmEdge_ValidatorDeleteFunction · 0.85
WasmEdge_ResultOKFunction · 0.85

Tested by

no test coverage detected