talira

QuickJS

Small, embeddable JavaScript engine with almost complete ES2025 support

open sourceMITself-hostablefree

QuickJS is a small JavaScript engine for embedding in C programs, written by Fabrice Bellard and Charlie Gordon. It's a few C files with no external dependencies, and a hello world program takes 367 KiB of x86 code. Its interpreter starts very quickly: a runtime instance's whole life cycle takes under 300 microseconds. It supports almost all of ES2025, including modules, async generators and Annex B, and passes nearly all of the ECMAScript test suite for those features. It uses reference counting with cycle removal for garbage collection, which keeps memory use low and behaviour deterministic. It can compile JavaScript to standalone executables, ships a command-line interpreter (qjs) and a small standard library with C library wrappers, and includes reusable libraries for regular expressions (libregexp), Unicode (libunicode) and float printing (dtoa). Cosmopolitan binaries run on Linux, macOS, Windows and the BSDs. It's MIT licensed.

Problems it solves

  • embed a JavaScript engine in my C or C++ application
  • a lightweight JavaScript interpreter with fast startup
  • run user scripts in JavaScript inside my app without bundling V8
  • compile a JavaScript program into a standalone executable
  • a small JavaScript runtime for constrained or embedded systems
  • a JavaScript engine with modern ES2025 support and no dependencies

Features

  • a few C files with no external dependencies
  • 367 KiB of x86 code for hello world
  • runtime life cycle under 300 microseconds
  • almost complete ES2025: modules, async generators, Annex B
  • nearly 100% of the ECMAScript test suite for ES2025 features
  • compile JavaScript to standalone executables
  • reference-counting GC with cycle removal
  • qjs command-line interpreter with contextual colorization
  • small standard library with C library wrappers
  • libregexp, libunicode and dtoa sub-libraries
View 1 more
  • Cosmopolitan binaries for Linux, macOS, Windows and BSDs on ARM64 and x86_64

Capabilities

Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what QuickJS does.

  1. V8 Google's open source high-performance JavaScript and WebAssembly engine
  2. JavaScriptCore WebKit's built-in JavaScript engine

Compare QuickJS with the top 3