qjsc(1)

qjsc1

Quickjs-ng bytecode compiler

Usage

qjsc [OPTION] ... [FILE] ...

Overview

QuickJS-NG is a small and embeddable JavaScript engine. It aims to support the latest ECMAScript specification.

The qjsc executable runs the JavaScript compiler. It can generate bytecode from source files which can then be embedded in an executable, or it can generate the necessary scaffolding to build a C application which embeds QuickJS.

Options

-b

Output raw bytecode instead of C code.

-C

Compile as classic JavaScript script. By default, qjsc will try to detect if each FILE is a JS script or an ES module.

-D MODULE_NAME

Compile a dynamically loaded module or worker.

-e

Output main() and bytecode in a C file.

-m

Compile as ECMAScript module. By default, qjsc will try to detect if each FILE is a JS script or an ES module.

-M MODULE_NAME[,CNAME]

Add initialization code for an external C module.

-n SCRIPT_NAME

Set the script name (as used in stack traces).

-N CNAME

Set the C name of the generated data.

-o OUTPUT

Set the output filename.

-p PREFIX

Add a prefix to generated C names.

-P

Do not add default system modules.

-s

Strip the source code. Specify this option twice to also strip debug info.

-S N

Set the maximum stack size to N bytes (default is 1 048 576).

From quickjs-ng 0.17.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.