File: README.md

package info (click to toggle)
rust-wasmparser 0.239.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,952 kB
  • sloc: makefile: 2
file content (28 lines) | stat: -rw-r--r-- 1,348 bytes parent folder | download | duplicates (57)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# `wasmparser`: A WebAssembly Binary Parser

**A [Bytecode Alliance](https://bytecodealliance.org/) project**

[![crates.io link](https://img.shields.io/crates/v/wasmparser.svg)](https://crates.io/crates/wasmparser)
[![docs.rs docs](https://img.shields.io/static/v1?label=docs&message=wasmparser&color=blue&style=flat-square)](https://docs.rs/wasmparser/)

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`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html)
using
[`Parser::new`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.new)
and then follow the examples documented for
[`Parser::parse`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.parse)
or
[`Parser::parse_all`](https://docs.rs/wasmparser/latest/wasmparser/struct.Parser.html#method.parse_all).

## Documentation

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