3 ms·
You should check out how Figma plugins work. They have blog posts on all the tradeoffs they considered. What I believe they settled on was a JS interpreter com
by TimTheTinker 2y ago
You should check out how Figma plugins work. They have blog posts on all the tradeoffs they considered.
What I believe they settled on was a JS interpreter compiled to WASM -- it can run arbitrary JS but with very well-defined and restricted interfaces to the outside world (the browser's JS runtime environment).
- bhl 2y ago> We now use QuickJS, a JavaScript VM written in C and cross-compiled to WebAssembly. https://www.figma.com/blog/an-update-on-plugin-security/ https://www.figma.com/blog/an-update-on-plugin-security/
- rekttrader 2y agoYo dog, we put a JavaScript VM inside your JavaScript VM