Skip to main content

Installation

QuickJS-ng can be installed in several ways. Choose the method that best fits your workflow.

Prebuilt Binaries

The easiest way to get started is with prebuilt binaries from GitHub releases.
1

Download the binary

Visit the GitHub Releases page and download the binary for your platform:
  • Linux (x86_64, ARM64)
  • macOS (x86_64, ARM64)
  • Windows (x86_64)
2

Extract and install

# Extract the archive
tar -xzf quickjs-*.tar.gz

# Move binaries to your PATH
sudo mv qjs qjsc /usr/local/bin/

# Verify installation
qjs --help
Each release includes binaries for multiple architectures. Make sure to download the one matching your system.

Using jsvu

As of version 2.2.0, jsvu (JavaScript Version Updater) installs QuickJS-ng when the quickjs engine is requested.
1

Install jsvu

npm install jsvu -g
2

Install QuickJS

jsvu --engines=quickjs
3

Add to PATH

Follow the instructions from jsvu to add the binary to your PATH, or run it directly:
~/.jsvu/quickjs
jsvu makes it easy to install and manage multiple JavaScript engines for testing and comparison.

Building from Source

For the latest features or custom builds, you can compile QuickJS from source.
1

Clone the repository

git clone https://github.com/quickjs-ng/quickjs.git
cd quickjs
2

Build QuickJS

make
3

Install system-wide

sudo make install
By default, this installs to /usr/local. You can customize the installation prefix:
make install INSTALL_PREFIX=/custom/path
See the Building guide for detailed build instructions, including debug builds and amalgamated builds.

Amalgamated Build

For projects that want to embed QuickJS without CMake, download the amalgamated build from the Releases page.
# Download quickjs-amalgam.zip from releases
wget https://github.com/quickjs-ng/quickjs/releases/latest/download/quickjs-amalgam.zip
unzip quickjs-amalgam.zip
The amalgamated build contains:
  • quickjs-amalgam.c - Single source file with all QuickJS code
  • quickjs.h - Main header file
  • quickjs-libc.h - Standard library header

Compiling the Amalgamated Build

# Basic compilation
gcc -c quickjs-amalgam.c -o quickjs.o

# With standard library modules (std, os, bjson)
gcc -c quickjs-amalgam.c -DQJS_BUILD_LIBC -o quickjs.o

# Link with your application
gcc your_app.c quickjs.o -lm -lpthread -o your_app
The amalgamated build is perfect for integrating QuickJS into existing projects without adding build system complexity.

Verifying Installation

After installation, verify that QuickJS is working:
qjs --help

What’s Included

A complete QuickJS installation includes:
  • qjs - The QuickJS interpreter and REPL
  • qjsc - The QuickJS compiler (JavaScript to C)
  • libquickjs.a or libquickjs.so - Static or shared library
  • Header files: quickjs.h, quickjs-libc.h

System Requirements

Linux

  • GCC 7+ or Clang 6+
  • CMake 3.10+
  • GNU Make
  • POSIX environment

macOS

  • Xcode Command Line Tools
  • CMake 3.10+
  • GNU Make (included)

Windows

  • MSVC 2017+ or MinGW-w64
  • CMake 3.10+

Embedded

  • C11 compiler
  • Minimal libc
  • ~200KB footprint

Troubleshooting

Windows Users: The Makefile wrapper is not available on Windows. You must use CMake commands directly.

Common Issues

Command not found If qjs is not found after installation, make sure the installation directory is in your PATH:
export PATH=/usr/local/bin:$PATH
Permission denied If you get permission errors during installation, use sudo:
sudo make install
Library not found If you get linker errors about missing libraries, update your library path:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Next Steps

Quick Start

Run your first QuickJS program

Building Guide

Learn about build options and customization

Build docs developers (and LLMs) love