tinywasm-parser
This crate provides the parser and lowering pipeline that converts WebAssembly binaries into tinywasm modules.
Features
std: Enables the use ofstdandstd::iofor parsing from files and streams.log: Enables logging of the parsing process using thelogcrate.parallel: Enables multithreaded parsing and validation whenstdis available.
Usage
use ;
let bytes = include_bytes!;
let parser = new;
let module = parser.parse_module_bytes?;
let parser = with_options;
let module = parser.parse_module_bytes?;
let module = parser.parse_module_file?;
let mut stream = open?;
let module = parser.parse_module_stream?;
If you just want the default configuration, the top-level parse_bytes, parse_file, and parse_stream helpers are thin wrappers around Parser::new().