16 ms·
wasm2c has a different objective though: to be recompile-able again while preserving semantics. wasm-decompile was designed for readability first.
by Aardappel 6y ago
wasm2c has a different objective though: to be recompile-able again while preserving semantics. wasm-decompile was designed for readability first.
- snazz 6y agoFair enough. I’m still surprised at just how unreadable (for me) the wasm2c output was, though. The compiler must have done quite a bit of optimizing that wasm2c was unable to undo.
- Aardappel 6y agoIt doesn't actually try to undo anything, it just translates Wasm instructions 1:1 (they're in your link at lines 205-221). wasm-decompile does try to "undo" some thing, but it is generally impossible given LLVM's optimized output and how low-level Wasm is (see also article).
- snazz 6y agoOkay, that makes sense.