Fairly certain you don't want to be throwing `eval` in your code.<p>I'm also building a workflow engine on the side, but don't want to see you run into security issues :)<p>Look into the realms TC39 proposal, the SES TC39 proposal, or running (no joke) a lightweight ES6 environment in webassembly to eval your code.<p><a href="https://github.com/tc39/proposal-realms/#ecmascript-spec-proposal-for-realms-api" rel="nofollow">https://github.com/tc39/proposal-realms/#ecmascript-spec-pro...</a><p><a href="https://github.com/tc39/proposal-ses" rel="nofollow">https://github.com/tc39/proposal-ses</a><p><a href="https://github.com/justjake/quickjs-emscripten" rel="nofollow">https://github.com/justjake/quickjs-emscripten</a>
Nice work!<p>This reminded me to a series of posts by Figma in which they described how their JS plugin system works [1].<p>I remember there were plenty of security reasons why eval was not the best way to go. I wonder if you guys took this into account?<p>[1] <a href="https://www.figma.com/blog/how-we-built-the-figma-plugin-system/" rel="nofollow">https://www.figma.com/blog/how-we-built-the-figma-plugin-sys...</a>
I love the idea of web workers. I struggle to find a use case that isn't limited by serialization/deserialization.<p>AFAIK, workers are strings in and strings out. Often serialization is the most expensive operation, so adding additional serialization/deserialization steps can decrease performance overall.<p>The only use case I can imagine that would really benefit is computation-heavy with minimal input/output.<p>Until there is safe shared memory (please correct me if I'm wrong) I don't see many compelling use cases for web workers.
Nice to read. I wrote a JS evaluator for a low code product and the whole thing feels quite natural to use JS as the scripting language for a low code product. Well done!
JavaScript in browser can be a nice sandbox for untrusted or semi-trusted code. We used that for a sort of AWS Lambda like thing some years ago<p><a href="https://github.com/flowhub/jsjob" rel="nofollow">https://github.com/flowhub/jsjob</a>