[][src]Function wasmer_runtime_c_api::module::wasmer_validate

#[no_mangle]
pub unsafe extern "C" fn wasmer_validate(
    wasm_bytes: *const u8,
    wasm_bytes_len: u32
) -> bool

Validates a sequence of bytes hoping it represents a valid WebAssembly module.

The function returns true if the bytes are valid, false otherwise.

Example:

bool result = wasmer_validate(bytes, bytes_length);

if (false == result) {
    // Do something…
}