Hacker News new | ask | show | jobs
by Lerc 754 days ago
Do 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.

1 comments

Yes. Compiling single files is supported by calling the exported `compile` function, example setup here: 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/ and source: https://github.com/glebbash/glebbash.dev/blob/main/static/lo...