Live data from Hacker News

New QuickJS Release

github.com

11–20 of 31 posts

Re: New QuickJS Release

#14

QuickJS is really cool! You can use it to embed JS code in a native binary, which is nice if you're trying to use a NodeJS library outside of the JS ecosystem. I put together a proof of concept for this about a year ago, in case this is a use case you currently have: https://github.com/ijustlovemath/jescx

stupid question but... doesn't Deno also promise that possibility? Or at least to compile a js app into a binary

Re: New QuickJS Release

#15

QuickJS is really cool! You can use it to embed JS code in a native binary, which is nice if you're trying to use a NodeJS library outside of the JS ecosystem. I put together a proof of concept for this about a year ago, in case this is a use case you currently have: https://github.com/ijustlovemath/jescx

stupid question but... doesn't Deno also promise that possibility? Or at least to compile a js app into a binary

Even if it does, it's always nice to have other options with different trade-offs

Re: New QuickJS Release

#16
post #7

We’ve been considering this library at work for a performance sensitive application (real time game). Can anyone here speak to the performance and memory usage of QuickJS?

Performance is pretty good if you consider starting and running small scripts. There is an interesting feature of compiling a js file into a C array bytecode so your runtime code could load that directly skipping the parsing step.

For a long running orlarge JS code something like Spidermonkey or V8 with their JITs might be faster. But they are not as embedding friendly and their code bases are much larger.

Re: New QuickJS Release

#18
I just upgraded quickjs-emscripten - my JS-in-JS wrapper library - to this new version of the upstream quickjs.

If you want to safely evaluate untrusted Javascript in the browser or Node with control over CPU time and memory use, a custom module system, or call async code synchronously, check it out: https://github.com/justjake/quickjs-emscripten

It's used by a few projects like Hoppscotch, a Postman-like visual API client (https://hoppscotch.io/). They use it for request scripting: https://docs.hoppscotch.io/documentation/getting-started/res...

Re: New QuickJS Release

#20

QuickJS is really cool! You can use it to embed JS code in a native binary, which is nice if you're trying to use a NodeJS library outside of the JS ecosystem. I put together a proof of concept for this about a year ago, in case this is a use case you currently have: https://github.com/ijustlovemath/jescx

stupid question but... doesn't Deno also promise that possibility? Or at least to compile a js app into a binary

Yes, although the sizes of the binaries differ greatly. See this [1] Twitter reply. A "hello world" example produced an ~85mb binary in Node and Deno, whereas QuickJS produced a 6MB binary.

[1] https://nitter.net/kebsworld/status/1648488613351657474#m

Post reply on HN