* \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. */
| 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 | /** |
nothing calls this directly
no test coverage detected