- Small and easily embeddable: The engine is formed by a few C files and does not have any external dependency.
- Fast interpreter: The interpreter shows impressive speed by running 56,000 tests from the ECMAScript Test Suite1 in just 100 seconds, and that too on a single-core CPU. A runtime instance completes its life cycle in less than 300 microseconds.
- ES2019 support: The support for ES2019 specification is almost complete including modules, asynchronous generators, and full Annex B support (legacy web compatibility). Currently, it does not has support for realms and tail calls.
This news struck a discussion on Hacker News, where developers were all praises for Bellard’s and Gordon’s outstanding work on this project. A developer commented, “Wow. The core is a single 1.5MB file that’s very readable, it supports nearly all of the latest standard, and Bellard even added his own extensions on top of that. It has compile-time options for either a NaN-boxing or traditional tagged union object representation, so he didn’t just go for a single minimal implementation (unlike e.g. OTCC) but even had the time and energy to explore a bit. I like the fact that it’s not C99 but appears to be basic C89, meaning very high portability.
Despite my general distaste for JS largely due to websites tending to abuse it more than anything, this project is still immensely impressive and very inspiring, and one wonders whether there is still “space at the bottom” for even smaller but functionality competitive implementations.”
Another wrote, “I can’t wait to mess around with this, it looks super cool. I love the minimalist approach. If it’s truly spec compliant, I’ll be using this to compile down a bunch of CLI scripts I’ve written that currently use node.
I tend to stick with the ECMAScript core whenever I can and avoid using packages from NPM, especially ones with binary components. A lot of the time that slows me down a bit because I’m rewriting parts of libraries, but here everything should just work with a little bit of translation for the OS interaction layer which is very exciting.”
To know more about QuickJS, check out Fabrice Bellard’s official website.