#1149232 ITP: pdfjs-quickjs -- QuickJS sandbox for pdf.js, compiled to WebAssembly

#1149232#5
Date:
2026-09-28 15:54:26 UTC
From:
To:
* Package name    : pdfjs-quickjs
  Version         : 0.0~git<date>
  Upstream Author : Mozilla Foundation
* URL             : https://github.com/mozilla/pdf.js.quickjs
* License         : MIT
  Programming Lang: C (compiled to WebAssembly), JavaScript
  Description     : QuickJS sandbox for pdf.js, compiled to WebAssembly

QuickJS, compiled to WebAssembly, providing the sandboxed JavaScript
interpreter pdf.js uses to run the JavaScript embedded in PDF files (form
scripts and similar).

I need it as a build-dependency of the zotero-reader package I am working
on.  It is not zotero specific: it is a general embedded JavaScript engine
compiled to WebAssembly.

The build runs upstream's compile.sh (emcc on top of bellard/quickjs, pinned
in the Dockerfile); the Docker step only provides the emsdk environment, so
it is an emcc invocation plus a small patch upstream carries.  Upstream
publishes only the built .wasm and pins no toolchain version, so the module
is not byte-identical to the published one; as with pdfjs-qcms,
debian/README.source will document the comparison used instead.

I intend to package the sibling modules (pdf.js.openjpeg, pdf.js.jbig2) the
same way.  pdfjs-qcms is already ITP'd as #1149220.

Thanks,
Emfox

#1149232#10
Date:
2026-09-28 16:12:55 UTC
From:
To:
Hello, just un case, quickjs-ng could distribute a wasm build of itself

Le lun. 28 sept. 2026, 18:06, Wei Zhou <emfox@debian.org> a écrit :

#1149232#15
Date:
2026-09-28 16:12:55 UTC
From:
To:
Hello, just un case, quickjs-ng could distribute a wasm build of itself

Le lun. 28 sept. 2026, 18:06, Wei Zhou <emfox@debian.org> a écrit :

#1149232#20
Date:
2026-09-29 01:12:21 UTC
From:
To:
Thanks for the info, I dig into the quickjs-ng stuffs in debian and found out:
quickjs-ng does ship wasm, but those builds are WASI/command-line
ones: they let the host run a script, not the stateful embedding with
a host callback bridge that pdf.js' sandbox is built around. The
difference sits in the module's import and export tables, which are
fixed at compile time, so no JavaScript wrapper can add it. Serving
pdf.js therefore means compiling the engine sources with Emscripten —
which is what this package does.

But it also reminds me to build against qjs-src instead of including
another copy of source, so the package is now just the pdf.js wrapper
and the interpreter sources stay in the archive in one place.

#1149232#25
Date:
2026-09-29 18:00:16 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
pdfjs-quickjs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1149232@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Emfox Zhou <emfox@debian.org> (supplier of updated pdfjs-quickjs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 29 Sep 2026 08:22:17 +0800
Source: pdfjs-quickjs
Binary: pdfjs-quickjs
Architecture: source all
Version: 0.0~git20260607+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Emfox Zhou <emfox@debian.org>
Changed-By: Emfox Zhou <emfox@debian.org>
Description:
 pdfjs-quickjs - QuickJS sandbox for pdf.js, compiled to WebAssembly
Closes: 1149232
Changes:
 pdfjs-quickjs (0.0~git20260607+dfsg-1) unstable; urgency=medium
 .
   * Initial release (Closes: #1149232).
   * Take the interpreter from the qjs-src package instead of vendoring the
     bellard/quickjs revision upstream pins.
Checksums-Sha1:
 c2990af0f05eeccb50ce7e74b87367a8fb68cd4f 2110 pdfjs-quickjs_0.0~git20260607+dfsg-1.dsc
 7b7081fe0b44f5cbcb269d008020b7896afe1e25 18116 pdfjs-quickjs_0.0~git20260607+dfsg.orig.tar.xz
 1749bd12915ee88637d925112a3e7f1b8c94046a 4936 pdfjs-quickjs_0.0~git20260607+dfsg-1.debian.tar.xz
 a7ec8e1bda962ec47896fdbffec1d6bf94647c42 212028 pdfjs-quickjs_0.0~git20260607+dfsg-1_all.deb
 391c7ece07b08e13cd4fff48957ff66cc0763ced 9744 pdfjs-quickjs_0.0~git20260607+dfsg-1_amd64.buildinfo
Checksums-Sha256:
 f44062db890d3692acd42248ab6da8ab7e37a737d013c91e944444b16b05f209 2110 pdfjs-quickjs_0.0~git20260607+dfsg-1.dsc
 d814c1c35136b78138befc56fdecb1ced0f9664e8ac724db6075f80a8385418e 18116 pdfjs-quickjs_0.0~git20260607+dfsg.orig.tar.xz
 a4073de604bab3217187a09c6cbaf90806ff6cd549792eca8c4178bdfd50be06 4936 pdfjs-quickjs_0.0~git20260607+dfsg-1.debian.tar.xz
 8f01cc96af5437d8eb820674d14e17123b4a9441a9e8c16814b98f8ffd00fd9a 212028 pdfjs-quickjs_0.0~git20260607+dfsg-1_all.deb
 34577e83c487a19f7a70f36f3b26c239b487822096eec15b011386913023524f 9744 pdfjs-quickjs_0.0~git20260607+dfsg-1_amd64.buildinfo
Files:
 0d7d5a893e1d958c0f783cdc756b41f9 2110 javascript optional pdfjs-quickjs_0.0~git20260607+dfsg-1.dsc
 3d90d1227319cd8bc3a1537e6ed2eac5 18116 javascript optional pdfjs-quickjs_0.0~git20260607+dfsg.orig.tar.xz
 56a82ccb90a90fbd3bbf0e66568ba1b1 4936 javascript optional pdfjs-quickjs_0.0~git20260607+dfsg-1.debian.tar.xz
 0e010ec31901a3f7eb9527bae617eb42 212028 javascript optional pdfjs-quickjs_0.0~git20260607+dfsg-1_all.deb
 cee8ca6d46c5545c66b3344b3f09d64c 9744 javascript optional pdfjs-quickjs_0.0~git20260607+dfsg-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEGSauJtItZVqOiaNpgImbv9t7vZQFAmq7u54ACgkQgImbv9t7
vZSUxRAA0nGT5ZFuHkf9cvl99oQoVmsYsc0nprjohqOnRBOy3snD4HHGONsbRSNk
FEP+cPfRSjvBOc2fqc8lq50ELRYyC4S9qmJ2IaluWrgrd7E+mdit3HiLdNzMHQaL
ItrO7syRylS1dneKl5/v5Gr/pLyRmhMBZpuJBpUtACkHvNCM6PM5M7wj/i0Xpvmo
rrkw1+E0JlJIk+I1NCgfrrDhyYCgY8SdnaE8HHI/VVCwC97h4OFoCJ4auMQ5QUxT
dXo/kkWJ6yebi/OqdZsSpyD5nkXCeVZydE1HeVcG/eq/s2UmNXAPN0xGjsIdWT5x
j/PHGWV/BoRaiVcW6Pjs/nVd24k4JOGxGoAJGYEeobOAS2GYKKc6B0nbM5CJ9n4d
bj7BiLKj24X8iyGe8fPHNsbDLuKbvrpMsRY5DF/YD6Gm9N7AW3lUAU5GM47q6kAB
wGJ9A+qpM408BLbWXer4L8ZhaFS28G5sGHt3z8iyic2IOOGVC7FiGmzMdcw7Iv0i
GpJYiU9cntZ4Dt8MZiHQvkh03wKV15AK8u2CfkvHpRg4fI45reP6G9Xh/D6qMyGd
2leVZCUUm1MG7w3MAXI9Ph0ojsBkVsg7INGK9UAXMRKrSN522RWAu9/dnXmElZ9w
AAnBbLGpktR+6ZgOhCI9P2yHjnIomLEIemEFLywFA5Z+rMbk1Z0=
=N2wg
-----END PGP SIGNATURE-----