wasmerio / wasmer-php

🐘🕸️ WebAssembly runtime for PHP
https://wasmerio.github.io/wasmer-php/wasm/
MIT License
1k stars 42 forks source link

feat: Implement the `wasm_validate` function #19

Closed Hywan closed 5 years ago

Hywan commented 5 years ago

Fix #15.

Basic usage:

$bytes = wasm_read_bytes('my_program.wasm');

if (false === wasm_validate($bytes)) {
    // error
}

This patch implements the wasm_validate function, updates all the tests, and integrates this function in the Wasm library.