#parser

no-std wasmparser

A simple event-driven library for parsing WebAssembly binary files

277 releases (172 breaking)

Uses new Rust 2024

0.251.0 May 28, 2026
0.249.0 May 15, 2026
0.246.1 Mar 31, 2026
0.243.0 Dec 3, 2025
0.7.2 Jul 7, 2017

#759 in #wasm

Download history 610365/week @ 2026-03-03 3767652/week @ 2026-03-10 3412710/week @ 2026-03-17 3381925/week @ 2026-03-24 3514410/week @ 2026-03-31 3865591/week @ 2026-04-07 4014411/week @ 2026-04-14 4380728/week @ 2026-04-21 4510970/week @ 2026-04-28 4976630/week @ 2026-05-05 5894037/week @ 2026-05-12 5967235/week @ 2026-05-19 6272784/week @ 2026-05-26 6134971/week @ 2026-06-02

25,097,145 downloads per month
Used in 48,518 crates (330 directly)

Apache-2.0…

1.5MB
30K SLoC

wasmparser: A WebAssembly Binary Parser

A Bytecode Alliance project

crates.io link docs.rs docs

A simple, event-driven library for parsing WebAssembly binary files (or streams).

The library reports events as they happen and only stores parsing information for a brief period of time, making it fast and memory-efficient. The event-driven model, however, has some drawbacks. If you need random access to the entire WebAssembly data-structure, this is not the right library for you. You could however, build such a data-structure using this library.

To get started, create a Parser using Parser::new and then follow the examples documented for Parser::parse or Parser::parse_all.

Documentation

Documentation and examples can be found at https://docs.rs/wasmparser/

Dependencies

~165–720KB
~14K SLoC