Skip to content

Repository files navigation

TeXlyre-BusyTeX

TeX Live 2026 compiled into a single WebAssembly module, based on busytex.

The corresponding WASM API for this build can be found at texlyre-busytex.

To run the package server, refer to the TeX Live server instructions.

Bundled engines and tools:

  • xetex, pdftex, luahbtex
  • bibtex8, xdvipdfmx, makeindex
  • kpsewhich, kpsestat, kpseaccess, kpsereadlink

Supported targets: x86_64-linux (static, musl) and wasm32.


Usage

Using prebuilt assets:

mkdir -p dist-wasm
wget -P dist-wasm --backups=1 $(printf "https://github.com/TeXlyre/texlyre-busytex-build/releases/latest/download/%s " \
  busytex_pipeline.js busytex_worker.js \
  busytex.wasm busytex.js \
  texlive-basic.js texlive-basic.data \
  texlive-recommended.js texlive-recommended.data \
  texlive-extra.js texlive-extra.data)

Using a local build:

Follow the build instructions first. The built assets will be placed in dist-wasm/.

Run the example:

python3 example/example.py --port 8183

Then open http://localhost:8183/example/example.html.


Building from source

Prerequisites

apt-get install -y \
  libnsl-dev build-essential coreutils cmake bash git \
  xz-utils wget perl gperf p7zip-full python3 gh strace \
  libarchive-tools curl dos2unix bubblewrap texlive-binaries

Emscripten

git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk update-tags
./emsdk install tot
./emsdk activate tot
source emsdk_env.sh
cd ..

Build

Warning

Building with Ubuntu > 26 requires the explicit setting of the cmake version export CMAKE_POLICY_VERSION_MINIMUM=3.5

git clone https://github.com/TeXlyre/texlyre-busytex-build
cd texlyre-busytex-build

export MAKEFLAGS=-j8

make source/texlive.txt build/versions.txt
make native
make smoke-native

If you want to provide the TeX Live ISO directly instead of having make source/texmfrepo.txt download it, place it in the source/ directory first:

wget -P source http://mirrors.ctan.org/systems/texlive/Images/texlive2026.iso
split -b2G -d source/texlive2026.iso source/texlive2026.iso.
make source/texmfrepo.txt
make build/texlive-basic.txt build/texlive-recommended.txt build/texlive-extra.txt build/texlive-full.txt
make wasm
make build/wasm/texlive-basic.js
make build/wasm/texlive-recommended.js
make build/wasm/texlive-extra.js
make wasm-postbuild-hyphenation-fmt
make smoke-wasm
make dist-native dist-wasm

Clean

rm source/texlive.patched
make clean

TeX Live package server

For packages not included in texlive-basic, texlive-recommended, or texlive-extra, a server can stream them on demand. The remote endpoint is configurable via the compile() method in web/busytex_pipeline.js.

Build the full TeX Live tree first:

make -B build/texlive-full.txt
make build/wasm/busytex.js

Then run the production server following the server instructions from within the texlive-server directory.


Roadmap

  • mf-nowin
  • LuaMetaTeX / LMTX (lua)
  • tlmgr (perl)
  • Biber (perl)
  • mktexlsr, fmtutil, updmap (perl)

License

TeXlyre-BusyTeX and the modifications applied to the build pipeline are licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). Based on busytex (MIT). See LICENSE and NOTICE.


References

About

WASM TeXlyre BusyTeX builder & file server for TexLive 2026 (01.03.26) supporting LuaTeX, PdfTeX, & XeTeX in the browser

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages