[][src]Function wasmparser::validate

pub fn validate(bytes: &[u8]) -> Result<()>

Test whether the given buffer contains a valid WebAssembly module, analogous to WebAssembly.validate in the JS API.

This functions requires the wasm module is entirely resident in memory and is specified by bytes. Additionally this validates the given bytes with the default set of WebAssembly features implemented by wasmparser.

For more fine-tuned control over validation it's recommended to review the documentation of Validator.