File: usage.md

package info (click to toggle)
node-webassemblyjs 1.11.0%2Bdfsg%2B~cs10.10.16-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,040 kB
  • sloc: javascript: 28,630; makefile: 84; sh: 42; ansic: 16
file content (22 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
title: Usage
id: usage
---

## CDN

You can import `https://bundle.run/webassemblyjs` and the `webassemblyjs` object will be accessible.

## yarn

```sh
yarn add @webassemblyjs/cli
```

### Command line interface

- `wasmdump FILENAME`: decodes a WASM binary and dumps its content
- `wasmast FILENAME`: prints the AST of the WASM binary.
- `wasmrun FILENAME [ENTRYPOINT]`: runs the WASM binary (uses the start section by default as entrypoint).
- `wasm2wast FILENAME`: prints the binary as WAST.
- `wastast FILENAME`: prints the WAST as an AST.