You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
577 B

1 month ago
  1. # @webassemblyjs/wasm-parser
  2. > WebAssembly binary format parser
  3. ## Installation
  4. ```sh
  5. yarn add @webassemblyjs/wasm-parser
  6. ```
  7. ## Usage
  8. ```js
  9. import { decode } from "@webassemblyjs/wasm-parser";
  10. import { readFileSync } from "fs";
  11. const binary = readFileSync("/path/to/module.wasm");
  12. const decoderOpts = {};
  13. const ast = decode(binary, decoderOpts);
  14. ```
  15. ### Decoder options
  16. - `dump`: print dump information while decoding (default `false`)
  17. - `ignoreCodeSection`: ignore the code section (default `false`)
  18. - `ignoreDataSection`: ignore the data section (default `false`)