What is the difference between wasm-as and wat2wasm? #5435
-
In my understanding, both of tools translates text-format wat to binary-format wasm, and So in view of users, what is the difference between these two tools? And if I want to translates a hand-written wat file to wasm, what is the recommended tool to use? (MDN uses wabt toolchains) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
WABT's |
Beta Was this translation helpful? Give feedback.
WABT's
wat2wasm
translates directly to Wasm without modifying anything and supports the full standard text format. Binaryen'swasm-as
does not support the full standard text format (although we are working on fixing that) and may modify instruction sequences that are not directly representable in Binaryen IR. If all you want to do is translate wat to Wasm, you're probably better off usingwat2wasm
as long as WABT supports all the Wasm features you're using. On the other hand, if you're developing a toolchain or optimization pipeline that uses Binaryen for other things, you might as well usewasm-as
.