This is essentially just Rust with the compile target set to WASM, though?
WASM Text (WAT) is not really meant to be human-authored, it's an IR representation, like LLVM IR.
The one genuine use I could see out of this is the ability to go backwards, from WAT -> High-level language
> "Compilers usually run one way. The most interesting engineering in Wax is in the reverse arrow."For tinkering with assembly programming style development wat and wat2wasm are excellent. Shame that wasm doesn’t really have sin(), cos(), and tan(). Makes tinkering with gui code that much harder. And having to manually link something like a math library is annoying for one-off experiments.
Calling the external JavaScript Math functions adds an incredible amount of latency as far as I recall. Has that been fixed for Math functions in the mean time?
> This is essentially just Rust with the compile target set to WASM, though?
It's not rust at all, it's a rust-like representation of wasm bytecode.
> WASM Text (WAT) is not really meant to be human-authored, it's an IR representation, like LLVM IR.
Which is exactly why TFA wrote an alternate representation, they're writing the runtime for a wasm target so they specifically want to craft their bytecode, and WAT is not a great thing to write.