5 ms·
Can I compile the engine to wasm? Yes I want to run JS on wasm. Yes I have a reason.
by skilesare 5y ago
Can I compile the engine to wasm? Yes I want to run JS on wasm. Yes I have a reason.
- gervwyk 5y agoWhy not have a look at QuickJs. I assume your reason is to run js in the browser in an isolated environment for security reasons? I’ve found this article from figma to be an excellent starting point [0] Also useful to consider this benchmark [1] of js runtimes. We’ve found quickjs-emscripten [2] to work really well thus far. You can see my implementation of it here [3] in Lowdefy. If still has a few rough edges, so would be really keen to make it better. I’m interested to know, is spidermonkey more comparable to V8 than QuickJs? [0] - https://www.figma.com/blog/how-we-built-the-figma-plugin-system/ https://www.figma.com/blog/how-we-built-the-figma-plugin-sys... [1] - https://bellard.org/quickjs/bench.html https://bellard.org/quickjs/bench.html [2] - https://github.com/justjake/quickjs-emscripten https://github.com/justjake/quickjs-emscripten [3] - https://github.com/lowdefy/lowdefy/blob/main/packages/operators/src/common/js.js https://github.com/lowdefy/lowdefy/blob/main/packages/operat...
- skilesare 5y agoI want to run it in DFINITY’s ICP.