78 ms·
The argument against the critics saying WebAssembly would make the web less open was, that you could always disassemble WebAssembly and that said disassembly wo
by simfoo 9y ago
The argument against the critics saying WebAssembly would make the web less open was, that you could always disassemble WebAssembly and that said disassembly would be much more readable than for example x86 assembly.
So - since a quick research did not turn up anything - is there a WASM to C "transpiler" that generates readable C?
- MaxBarraclough 9y agoBut that's not really the worry. It's always been possible to obfuscate JavaScript. All that changes with WebAssembly is that it might drive even more needless code, and complicate the web's architecture even further. For example, web browsers for the blind become far harder to implement when ordinary websites are using heaps of boated JavaScript. (The web used to have HTML for content, and CSS for presentation. No longer. Now it's just a mess.) The problem would be compounded if WebAssembly+canvas were to catch on.
- konsoletyper 9y agoCurrently, if you run TeaVM with 'debug' (-g) option, and WASM target, you'll get both '.wasm', '.wast' and '.c' files. C file is compilable with GCC and you should write several trivial functions manually to get working binary, either '.so' or '.exe'.
- kodablah 9y ago> So - since a quick research did not turn up anything - is there a WASM to C "transpiler" that generates readable C? I'm not aware of one, though it would probably be trivial to write. https://github.com/WebAssembly/binaryen https://github.com/WebAssembly/binaryen has the helping code for things like parsing. Both https://github.com/kanaka/wac https://github.com/kanaka/wac and https://github.com/WebAssembly/wasm-jit-prototype https://github.com/WebAssembly/wasm-jit-prototype interpret WASM. The latter even JITs into LLVM IR.