logoalt Hacker News

MobiusHorizonsyesterday at 7:42 PM3 repliesview on HN

I'm curious what practical purpose you could have for running a js execution engine in an environment that already contains a (substantially faster) js execution engine? Is it just for the joy of doing it (if so good for you, absolutely nothing wrong with that).


Replies

kettlecorntoday at 2:43 AM

Sandboxing.

Figma for example used QuickJS, the prior version of the library this post is about, to sandbox user authored Javascript plugins: https://www.figma.com/blog/an-update-on-plugin-security/

It's pretty handy for things like untrusted user authored JS scripts that run on a user's client.

JoshTriplettyesterday at 8:42 PM

WebAssembly also runs in places other than the web, where there isn't a JavaScript interpreter at hand. It'd be nice to have a fast JavaScript engine that integrates inside the WebAssembly sandbox, and can call and be called by other languages targeting WebAssembly.

That way, programs that embed WebAssembly in order to be scriptable can let people use their choice of languages, including JavaScript.

baudauxyesterday at 8:03 PM

It allows, for example, to create bindings as I did for raylib graphics library. exaequOS can run any program that can be built to WebAssembly It will soon support WASI p1 and p2. So many programming languages will be possible for creating programs targeting exaequOS

show 1 reply