3 ms·
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
by Lerc 2y 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.
- 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...