3 ms·
But have you tried compiling V8 to WebAssembly to run the JS inside a VM within JS? /s
by 19h 4y ago
But have you tried compiling V8 to WebAssembly to run the JS inside a VM within JS? /s
- apineda 4y agoI believe Figma does this. Considering the lack of options it ain't so bad. Other options include running an iframe, or using something like `ses` library. I do both depending on the plugin. As always the biggest pita is sharing instances of anything at all sigh.
- turblety 4y agoIt's actually possible to do it with a library called Duktape [0]. But yeah, I get it would be super slow, and create a huge wasm file for the client to download. 0. https://duktape.org/ https://duktape.org/