3 ms·
One reason to use WASM to run JS, even in a browser, is to allow for interruptible execution of untrusted JS code. I built a library for this (1.2mb) that uses
by jitl 5y ago
One reason to use WASM to run JS, even in a browser, is to allow for interruptible execution of untrusted JS code. I built a library for this (1.2mb) that uses Emscripten to build QuickJS to WASM. I know of a company using my library to implement "plugin"/user-scripting using my library.
https://github.com/justjake/quickjs-emscripten#quickjs-emscripten https://github.com/justjake/quickjs-emscripten#quickjs-emscr...
- tim1994 5y agoThanks for building this, very cool project. I am considering using this to simulate web extensions for some automated analysis.
- lewisjoe 5y agoAwesome project. Curious question: Why not just use an embeddded v8 to sandbox untrusted code? I remember some databases used this v8 approach to let users write untrusted db plugins. Any specific advantages using webassembly instead of a v8 instance?
- jitl 5y agov8 is orders of magnitude more complex than QuickJS. There is no “just” available in a browser.
- infinite8s 5y agoYou can't use embedded V8 in a browser.