|
|
|
|
|
by err4nt
2904 days ago
|
|
I'm not an expert, but my understanding is that WASM has two formats: a text-based format called WAT, and a binary format called WASM. In order to run the code in the browser, the code will have to be compiled to the binary format. So where WAT comes in is your methods for producing WASM files now become one of the following: Source in <otherlang> -> WAT -> WASM Source in <otherlang> -> WASM WAT -> WASM So the human-readable WAT can either be used as a compile target for another language, which can easily be compiled into WASM, or you can write the WAT manually and compile it. Alternatively other languages might be able to compile directly to the binary format, skipping WAT representation entirely. |
|
The translation between WAT and the binary format is lossless, so there's no advantage of producing WAT as an intermediate step.