42 points · by cheanrick · 6y ago · 7 comments
The library in the current post, Seafox - cute name! - is "just" the parser, turning JavaScript code into an abstract syntax tree. One would need a sandboxed interpreter/evaluator/virtual machine to run it.
You might be aware of Figma's efforts, where they compiled Fabrice Bellard's QuickJS engine (in C) to WASM, to use for their plugin system.
https://www.figma.com/blog/how-we-built-the-figma-plugin-sys...
https://www.figma.com/blog/an-update-on-plugin-security/
The first article describes an earlier system using Realms, a shim/polyfill for an ECMAScript proposal.
> Twice as fast as other Javascript parsers (sic) written in JavaScript.