News for hackers. Stuff that matters.
Re:Deno in 2023 by ijustlovemath on Monday February 05, 2024 @07:22AM (#39260466)
I'm not sure what your requirements are, but I've had a good amount of success with converting Node.js libraries to native libraries by embedding a CommonJS module into the binary, then running the actual code through QuickJS. Much smaller binaries.

If you really are pressed for space, you could use upx, or store 7z compressed code and embed the 7z library to decompress before passing it along to QuickJS.

Here's a proof of concept: https://github.com/ijustlovemath/jescx

Re:Deno in 2023 by dns_snek on Monday February 05, 2024 @10:25AM (#39262161)
Isn't QuickJS order(s) of magnitude slower than V8? That doesn't seem like a practical tradeoff to make outside of embedded.
Re:Deno in 2023 by ijustlovemath on Monday February 05, 2024 @11:32AM (#39263048)
Like I said, I wasn't sure of their requirements. I can say QuickJS is orders of magnitude easier to embed and understand than V8, which is why I adopted it for my use case.
Re:Deno in 2023 by factormeta on Monday February 05, 2024 @05:31PM (#39268152)
Thanks for sharing that info!

Would like to see more runtime independent JS project such Hono. Although I'm not sure if it supports QuickJS.

Re:Deno in 2023 by tracker1 on Monday February 05, 2024 @03:12PM (#39266460)
Depends on what you are doing and what your needs are .. the gp comment was about the size.