7 ms·
Hi, it's my first time posting here, just wanted to share the language I was working on for some time now. I've been working on integrating it with WASM-4 runt
by glebbash 2y ago
Hi, it's my first time posting here, just wanted to share the language I was working on for some time now.
I've been working on integrating it with WASM-4 runtime this past week. And with minimal changes to the compiler I created this demo game:
https://rawcdn.githack.com/glebbash/LO/da8305293f5438967619e91c6ecfd472111ccf91/examples/test/demos/wasm4/builds/dark-maze.html https://rawcdn.githack.com/glebbash/LO/da8305293f5438967619e...
Game source here: https://github.com/glebbash/LO/blob/main/examples/test/demos/wasm4/src/dark-maze.lo https://github.com/glebbash/LO/blob/main/examples/test/demos...
- JonChesterfield 2y agoStraight to wasm is a good choice. You could get something close to a native binary by packaging the result with wasm3 or similar.
- airstrike 2y agoyou might want to consider changing the title to a "Show HN" https://news.ycombinator.com/show https://news.ycombinator.com/show
- Lerc 2y agoDo you have (or plan to support) a Wasm build of the compiler so you can compile from within the browser? Given you have includes I guess you'd need to provide a loadFile(filename) callback to provide it with data.
- glebbash 2y agoYes. Compiling single files is supported by calling the exported `compile` function, example setup here: https://github.com/glebbash/LO/blob/60b80d1b325136ce1ceaf4dc12073b7faaceb853/utils.mjs#L529 https://github.com/glebbash/LO/blob/60b80d1b325136ce1ceaf4dc.... For includes to work compiler uses WASI which can be implemented in the browser. LO playground and VSCode extension use this approach. Playground link: https://glebbash.deno.dev/lo-playground/ https://glebbash.deno.dev/lo-playground/ and source: https://github.com/glebbash/glebbash.dev/blob/main/static/lo-playground/index.html https://github.com/glebbash/glebbash.dev/blob/main/static/lo...
- ceronman 2y agoVery nice project! I love the fact that you have almost no dependencies for the compiler. I'm interested in learning how to build a compiler for web assembly and your code seems very clean, simple and easy to follow. Thanks!
- bodge5000 2y agoGreat to see some attention to WASM-4, if it plays nicely with that I'll definitely give it a go
- zxxh 2y ago[dead]