Is it possible to decompile Web Assembly (wasm) files to a specific programming language?

There is a converter from webassembly binaries to C.

https://github.com/WebAssembly/wabt/tree/master/wasm2c

As written in the other answer it will not look anything of the original source file, but at least it should be able to transfer the logic to C which then again also could be used with other languages by wrapping it into a library.


There are no WebAssembly disassemblers that I am aware of at the moment. One significant obstacle to this is that a great deal of information is discarded in the compilation process. The languages you are interested in (JavaScript, Java, Python, Go) have constructs like strings, classes, structs, etc ... none of which exist at the WebAssembly level. Furthermore, function and variables names are not (typically) present in the resulting WebAssembly module.

While you could create a tool that would 'translate' a WebAssembly module into a Java, Python, Go or JavaScript program that when executed it exhibited the correct behaviour, it would look nothing like the original program that was compiled to WebAssembly.

Tags:

Webassembly