3 ms·
Check out what I wrote earlier about how WAForth dynamically generates and links WASM code! By just reading the WASM documentation I didn't realize it was possi
by DonHopkins 3y ago
Check out what I wrote earlier about how WAForth dynamically generates and links WASM code! By just reading the WASM documentation I didn't realize it was possible to call back into JavaScript to dynamically create and link in WASM code on the fly, but WAForth opened my eyes to that, by compiling each FORTH word definition into a tiny little module and linking them all together. No (practical) limit on the number of modules that you can use in the same WASM app. It would be cool for a game editor app to have a visual programming language that compiles directly to WASM that way, so you can edit code at runtime.
https://news.ycombinator.com/item?id=34374057 https://news.ycombinator.com/item?id=34374057
- TrevorSundberg 3y agoYES! Absolutely yes to this. Right now the built in language was made well before WASM was even a thing, but at some point in the future I'd like to make it target WASM directly or even potentially use AssemblyScript or something like it. I certainly also want to have the engine support importing WASM modules as plugins, for when you need serious near-native performance rather than a scripting language. Tiny modules also sound awesome. I'll give the article a read, thanks for this!