Hacker News new | ask | show | jobs
by simen 2812 days ago
It doesn't translate to wasm text format, but to wasm binary format. The walt-compiler (https://github.com/ballercat/walt/tree/master/packages/walt-...) readme shows how to use it to compile text into a a buffer which you can write to disk or instantiate into a webassembly module.
1 comments

    It doesn't translate to wasm text format,
    but to wasm binary format.
Oh, ok. That is interesting too. But I would have liked to build a tool where I type Walt on the left and see the resulting WASMtext on the right. So this seems to not be a solution for that.
That tool already exists: https://ballercat.github.io/walt/ - though you have to switch 'tabs' to see the WASM code.
Yes, I saw that.

It's not the interface that I would like to use. I want to write Walt on the left and instantly see the WasmT on the right.

Also, that tool does not work here. It gives me 'Uncaught ReferenceError: getAST is not defined' as soon as I type something in the code tab.

What? Just use wasm2wat [1] and you’ll get the text format.

[1] https://github.com/WebAssembly/wabt