2

Is there a way to decode .wasm WebAssembly files and either understand it or convert it to javascript?

for example I have this script and I would like to know how to decode it

Woold
  • 783
  • 12
  • 23

1 Answers1

2

There are a couple of different ways to decode a wasm file. The first, and simplest, is wasm2wat from the WebAssembly Binary Toolkit. This simply takes a binary wasm file and converts it into a human-readable text form (WAT). However, wasm is a compact and relatively low level binary format, and as a result, much of the information in the original code is lost. As a result, decompiled WAT files may not be that easy to read.

More recently, the Chrome team launched wasm-decompile, a tool that attempts to create a more readable decompiled output using a pseudo language that is quite readable (for JavaScript developers).

ColinE
  • 68,894
  • 15
  • 164
  • 232