14 releases (8 breaking)

0.8.0 Aug 29, 2024
0.7.0 May 15, 2024
0.6.1 May 9, 2024
0.6.0 Mar 27, 2024
0.1.0 Dec 27, 2023

#738 in WebAssembly

Download history 7/week @ 2024-06-21 9/week @ 2024-06-28 31/week @ 2024-07-05 5/week @ 2024-07-12 4/week @ 2024-07-19 8/week @ 2024-07-26 6/week @ 2024-08-02 3/week @ 2024-08-09 79/week @ 2024-08-23 57/week @ 2024-08-30 1/week @ 2024-09-06 22/week @ 2024-09-13 39/week @ 2024-09-20 41/week @ 2024-09-27 4/week @ 2024-10-04

106 downloads per month
Used in tinywasm

MIT/Apache

89KB
2K SLoC

tinywasm-parser

This crate provides a parser that can parse WebAssembly modules into a TinyWasm module. It uses my fork of the wasmparser crate that has been modified to be compatible with no_std environments.

Features

  • std: Enables the use of std and std::io for parsing from files and streams.
  • logging: Enables logging of the parsing process using the log crate.

Usage

use tinywasm_parser::Parser;
let bytes = include_bytes!("./file.wasm");

let parser = Parser::new();
let module = parser.parse_module_bytes(bytes).unwrap();
let mudule = parser.parse_module_file("path/to/file.wasm").unwrap();
let module = parser.parse_module_stream(&mut stream).unwrap();

lib.rs:

See tinywasm for documentation.

Dependencies

~4MB
~67K SLoC