Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can we compile it back to wasm again? ;P


No.

> Its #1 goal is readability: help guide readers understand what is in a .wasm with as easy to follow code as possible. Its #2 goal is to still represent Wasm as 1:1 as possible, to not lose its utility as a disassembler. Obviously these two goals are not always unifiable.

> This output is not meant to be an actual programming language and there is currently no way to compile it back into Wasm.


Actually I thought about implementing a programming language which is a bit more pleasant to work with than raw wat format, but which still translated roughly 1 to 1 to wasm. Something like in this link, actually. But that seems outside of my capabilities and I'm not sure if it's really useful to anyone.


You might enjoy AssemblyScript.

http://assemblyscript.org


The great thing about AssemblyScript is it makes it possible to share some of the same code and interfaces and data and tools between JavaScript and WebAssembly.

If you're already developing in TypeScript, WebAssembly is a good way to generate WASM code that interoperates nicely with it, which you can't do with plain old JavaScript.


there are a few languages already do that, but mostly non-serious stuff.

https://github.com/appcypher/awesome-wasm-langs

I've implemented one but still need to get back to it to finish it... WASM is one of the easiest targets out there, hence so many languages already targeting it. But that will change once some of the WASM proposals become a standard, especially things like GC support and WASI, which will take a team (and long term investments) rather than a lone dev to implement:

https://webassembly.org/docs/future-features/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: