QJSC(1)

πŸ“¦ version 0.18.0, in arch rolling, nixpkgs unstable, ubuntu stonking

πŸ’– QJSC(1) β€” okay so bestie, this is qjsc πŸ’–

Like, welcome to the manual page for qjsc, aka the QuickJS-NG bytecode compiler, and honestly? She's iconic. Sit down, grab a boba, we're doing this. πŸ§‹βœ¨


🌈 NAME 🌈

qjsc β€” the QuickJS-NG bytecode compiler. That's her. That's the whole name. Slay.


✨ SYNOPSIS ✨

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

Yeah, that's it. Options then files, in whatever order, and she will handle it. Periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so QuickJS-NG is a small and embeddable JavaScript engine, and no cap, she aims to support the latest ECMAScript specification. Small. Embeddable. Modern. The whole package. πŸ‘‘

So the qjsc executable runs the JavaScript compiler. What she does is generate bytecode from source files, and that bytecode can then be embedded in an executable. OR β€” plot twist β€” she can generate the necessary scaffolding to build a C application which embeds QuickJS. Choose your own adventure, both paths are valid, both are giving main character energy. πŸŽ€

TL;DR: source files go in, bytecode (or C scaffolding) comes out. It's giving compiler. iykyk.


πŸ’… OPTIONS πŸ’…

  • -b β€” Output raw bytecode instead of C code. Just the raw stuff, no C wrapper, no extra decoration. Minimalist queen. πŸ–€
  • -C β€” Compile as classic JavaScript script. By default, qjsc will try to detect if each FILE is a JS script or an ES module. So this is you saying "bestie, it's a script, trust me" instead of letting the auto-detect do its thing. πŸ™ˆ
  • -D MODULE_NAME β€” Compile a dynamically loaded module or worker. Dynamic. Loaded later. Very mysterious, very "I'll appear when you least expect it". ✨
  • -e β€” Output main() and bytecode in a C file. Yesss, give us the entry point AND the bytecode together in one C file. Efficient queen. πŸ”₯
  • -m β€” Compile as ECMAScript module. By default, qjsc will try to detect if each FILE is a JS script or an ES module. So this is you manually saying "it's a module, she's a module, modules only". πŸ’–
  • -M MODULE_NAME[,CNAME] β€” Add initialization code for an external C module. Note the comma β€” CNAME is optional, MODULE_NAME is not. Don't skip the important part. 😭
  • -n SCRIPT_NAME β€” Set the script name (as used in stack traces). Very important for when things go wrong and you need to know WHICH script is being dramatic. πŸ‘€
  • -N CNAME β€” Set the C name of the generated data. Naming things is power, and this is you claiming it. πŸŽ€
  • -o OUTPUT β€” Set the output filename. Otherwise she picks, and like, sometimes you want a say in your own destiny. 🌸
  • -p PREFIX β€” Add a prefix to generated C names. Great for avoiding collisions, which is honestly just good manners. 🫢
  • -P β€” Do not add default system modules. Big "no thanks, I brought my own" energy. πŸ’€
  • -s β€” Strip the source code. And listen, this one's got levels: specify this option twice to also strip debug info. Double it up, get more stripped. She's a bit of an overachiever like that. βœ‚οΈ
  • -S N β€” Set the maximum stack size to N bytes. The default is 1 048 576. Yes, that's the default, and yes, you have to live with it unless you say otherwise. πŸ”₯
Pro tip from your girl: that's -s capitalized differently from -S and they do completely different things. One strips source, one sets stack size. Watch the case, bestie, she is case-sensitive and she will not be forgiving. 😭

🌟 SEE ALSO 🌟

πŸ“– Man pages

  • qjs(1) β€” the sibling. Go say hi. The way that these two go together... obsessed. πŸ’œ

🌐 Online documentation

Detailed documentation about the project can be found at:

https://quickjs-ng.github.io/quickjs/

Go read it, it's giving educational, it's giving thorough. πŸ“šβœ¨


And that's the whole page, bestie. Every option, every default, every path β€” nothing skipped, nothing gatekept. You're welcome. πŸ’…

Signing off from the General Commands Manual, dated 2026-07-22 β€” this was QJSC(1), and she ate. No crumbs. πŸŽ€πŸŒˆπŸ’–

πŸ“¦ where this page comes from