TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

Consider: `--script: wat` to support raw textual web assembly

Open joshgoebel opened this issue 2 years ago • 0 comments

I was just talking to @keithohara about the possibility of script: wat... (for those who REALLY want to write and run raw textual web assembly as it's own thing) and just realized that now that the WASM work is done it would be absurdly trivial to add WAT (as it's own language) provided we could get the wat2wasm source to compile properly on all our supported platforms.

Probably no more than a 200 line wrapper around the WASM runtime that on init compiles a temporary BINARY segment and on close wipes that segment and otherwise just defers to WASM init/shutdown... everything else is just the editor trappings, syntax keywords, etc...

Now personally I don't think this is a thing a lot of people would want, but as a teaching/educational tool I could see it being interesting... provided the compiler error were surfaced well (and assuming there are decent compiler errors to be had).

Originally posted by @joshgoebel in https://github.com/nesbox/TIC-80/issues/1775#issuecomment-1005364454

joshgoebel avatar Feb 23 '22 17:02 joshgoebel