MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / validate

Method validate

crates/c-api/include/wasmtime/module.hh:76–83  ·  view source on GitHub ↗

* \brief Validates the provided WebAssembly binary without compiling it. * * This function will validate whether the provided binary is indeed valid * within the compilation settings of the `engine` provided. */

Source from the content-addressed store, hash-verified

74 * within the compilation settings of the `engine` provided.
75 */
76 static Result<std::monostate> validate(Engine &engine, Span<uint8_t> wasm) {
77 auto *error =
78 wasmtime_module_validate(engine.capi(), wasm.data(), wasm.size());
79 if (error != nullptr) {
80 return Error(error);
81 }
82 return std::monostate();
83 }
84#endif // WASMTIME_FEATURE_COMPILER
85
86 /**

Callers

nothing calls this directly

Calls 5

wasmtime_module_validateFunction · 0.85
ErrorClass · 0.70
capiMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected