1
|
# @webassemblyjs/wasm-parser
|
2
|
|
3
|
> WebAssembly binary format parser
|
4
|
|
5
|
## Installation
|
6
|
|
7
|
```sh
|
8
|
yarn add @webassemblyjs/wasm-parser
|
9
|
```
|
10
|
|
11
|
## Usage
|
12
|
|
13
|
```js
|
14
|
import { decode } from "@webassemblyjs/wasm-parser";
|
15
|
|
16
|
const decoderOpts = {};
|
17
|
|
18
|
const ast = decode(binary, decoderOpts);
|
19
|
```
|
20
|
|
21
|
### Decoder options
|
22
|
|
23
|
- `dump`: print dump information while decoding (default `false`)
|
24
|
- `ignoreCodeSection`: ignore the code section (default `false`)
|
25
|
- `ignoreDataSection`: ignore the data section (default `false`)
|
26
|
|