Hacker News new | past | comments | ask | show | jobs | submit login

Generally, WAT is produced from the binary format. Compilers don't go through WAT; they produce the binary output directly.

The translation between WAT and the binary format is lossless, so there's no advantage of producing WAT as an intermediate step.




Since WAT -> WASM is already easy to do, compiling <otherlanguage> to WAT makes it really easy for people to create their own abstractions for writing WebAssembly in nearly _any_ other programming language, not just those that can compile directly to the binary format.


I don't understand why that would be true.

It's also just as easy to get WASM from WAT as it is WAT from WASM. I don't know of any languages that compile to WAT and then compile to WASM; as far as I know 100% of languages compile directly to WASM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: