/wasm-printer

Parse wasm file to wat

Primary LanguageRustOtherNOASSERTION

Parse wasm file to wat

Build Status

Built with 🦀🕸

Usage

import("@axetroy/wasm-printer").then((parse_wat) => {
  fetch("/path/to/demo.wasm")
    .then((resp) => resp.arrayBuffer())
    .then((bytes) => {
      const str = parse_wat(new Uint8Array(bytes));

      console.log(str);
    });
});

🚴 Installation

  1. if you are using Bundler(Which build-in support to importing wasm module, eg. Webpack^5/Vite)
npm install @axetroy/wasm-printer
  1. If you are using in Native browser

🛠️ Build from source

Make sure you have install rust^1.69 and wasm-pack

make

License

Anti-996