by sjrd · 1y ago · 0 comments
> It's not really a compiler, but a transpiler to WAT.
That's still a compiler. What do you think many languages' early compilers were doing when they compiled to C source code? Heck, what do you think early C compilers were doing when they were compiling to .s files, before feeding them into assemblers?
These are all the same technology. We write compilers, with all the same skills, methodologies, practices. It doesn't matter the format that we output.
In any case, I 100% agree that this is obviously a compiler. The fact that the compiler emits WASM as text, i.e. WAT, doesn't mean it is source-to-source translation - the output is still assembly code for the target machine.
And as an aside, does it really emit WAT? or is that just a debugging view of its output? If you can emit WAT, there is zero reason you can't emit WASM too.