Debian Codegraph @

third_party/rust/wasmparser/README.md

raw
1 # `wasmparser`: A WebAssembly Binary Parser
2
3 **A [Bytecode Alliance](https://bytecodealliance.org/) project**
4
5 [![crates.io link](https://img.shields.io/crates/v/wasmparser.svg)](https://crates.io/crates/wasmparser)
6 [![docs.rs docs](https://img.shields.io/static/v1?label=docs&message=wasmparser&color=blue&style=flat-square)](https://docs.rs/wasmparser/)
7
8 A simple, event-driven library for parsing WebAssembly binary files (or
9 streams).
10
11 The library reports events as they happen and only stores parsing information
12 for a brief period of time, making it fast and memory-efficient. The
13 event-driven model, however, has some drawbacks. If you need random access to
14 the entire WebAssembly data-structure, this is not the right library for
15 you. You could however, build such a data-structure using this library.
16
17 To get started, create a
18 [`Parser`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html)
19 using
20 [`Parser::new`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.new)
21 and then follow the examples documented for
22 [`Parser::parse`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.parse)
23 or
24 [`Parser::parse_all`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.parse_all).
25
26 ## Documentation
27
28 Documentation and examples can be found at https://docs.rs/wasmparser/