news.volyx.in

QuickJS JavaScript Engine (bellard.org)

948 points by apaprocki · 2658 days ago · 261 comments on HN

Article summary

QuickJS is a JavaScript engine that is small, embeddable, and fast, with a low startup time and support for ES2025 features. It can compile JavaScript sources to executables with no external dependency and has a built-in standard library with C library wrappers. The engine is released under the MIT license and has been recently updated with a new release. The author, Fabrice Bellard, is a prolific programmer and creator of several notable projects.

Main themes

  • JavaScript engine
  • Embedded systems
  • Performance optimization
  • Licensing and open-source
  • Compilation and executables
  • Standard library and APIs

What commenters say

  • QuickJS could be a suitable replacement for other JavaScript engines like SpiderMonkey or Duktape in desktop applications due to its performance and ease of use.
  • Compiling a Node.js app to a binary with QuickJS might be possible but would require translating Node-specific APIs or creating a compatibility layer.
  • Some commenters believe that QuickJS is the easiest JavaScript engine to embed and use, while others mention potential difficulties in replacing V8 in Node.js due to its tight integration with C++ addons.
  • The addition of a native 'net' module to QuickJS could enable benchmarks comparing its performance to Node.js for HTTP and networking tasks.
  • There are different opinions on the feasibility of using QuickJS as a drop-in replacement for V8 in Node.js, with some commenters citing potential issues with hooking C++ addons and others suggesting it could be done with sufficient effort.
  • The use of setjmp/longjmp for exception handling in some JavaScript engines is seen as a drawback, and QuickJS's avoidance of this approach is viewed as an advantage for memory management and simplicity.
  • Some commenters appreciate the potential of QuickJS for creating standalone binaries and its implications for desktop applications and performance.