3 ms·
whats the use case of quick js compared to node?
by jalino23 4y ago
whats the use case of quick js compared to node?
- atwood22 4y agoIt’s really good as an embedded JS engine. Like let’s say you want to make an iOS app that executed JS. If you use V8 (Node’s JS engine), then you’re app is at a minimum 28M in size just from V8. If you use QuickJS, your app size increases by less than 1M.
- skybrian 4y agoOn iOS, why wouldn't you use WebKit? (Genuine question; I'm not an iOS developer.)
- atwood22 4y agoI don’t think you can create native bindings in WebKit. You can only interact with something like WKWebView using serializable messages. QuickJS let’s you create native objects and expose them directly to the JS API. QuickJS also let’s you get JS variables natively and control how and when things get executed.
- k__ 4y agoScripting. Like Lua in games etc.