typesetting / rust
TeXres
A TeX distribution in a single executable, written in Rust. It compiles LaTeX documents with pdfLaTeX, XeLaTeX or LuaLaTeX, and includes the LaTeX formats, a package archive, fonts, BibTeX and Biber. You don't need TeX Live, and nothing is downloaded during a build.
texres paper.tex runs LaTeX, BibTeX or Biber as many times as needed and writes paper.pdf.
Install
files on the latest release pageAll packages are on the latest release page; file names carry the version number. Linux ARM64 builds need glibc 2.36 or newer (Debian 12 or later), which includes Linux Docker containers on Apple Silicon. Alpine and other musl systems are not supported.
Install with Homebrew:brew install leoliu0/texres/texresOr download texres-v…-macos-aarch64.pkg (Apple Silicon) or …-macos-x86_64.pkg (Intel).
Download and run texres-setup-v…-windows-x64.exe. A portable tex-suite-v…-windows-x86_64.zip is also available.
Download texres_…_amd64.deb or texres_…_arm64.deb, then:sudo apt install ./texres_*_amd64.deb
Download texres-…-1.x86_64.rpm or …-1.aarch64.rpm, then:sudo dnf install ./texres-*.x86_64.rpm
Prebuilt binary:yay -S texres-binOr build from source with yay -S texres.
For any glibc distribution. Installs to ~/.local:tar -xzf tex-suite-v…-linux-x86_64.tar.gz
./tex-suite-linux-x86_64/install.sh
git clone https://github.com/leoliu0/texres.git
cd texres
cargo build --release --locked --bin texres
./install.sh --from-sourceInstalls into ~/.local; add --system for /usr/local.
Features
Three engines
pdfLaTeX, XeLaTeX and LuaLaTeX. Documents loading fontspec, xeCJK, ctex, unicode-math or polyglossia run as XeLaTeX automatically; everything else runs as pdfLaTeX. Override with -pdf, -xelatex or -lualatex.
BibTeX and Biber built in
\bibliography runs BibTeX. biblatex with the default backend=biber runs the built-in Biber, which writes the same .bbl as Biber 2.22. Works offline.
Self-contained
LaTeX formats, a package archive and fonts are bundled. No TeX Live needed, and nothing is downloaded during a build. Output is compared against TeX Live 2026 in CI.
Fonts
Bundled fonts include Latin Modern, TeX Gyre, STIX Two, Libertinus, IPAex, Harano Aji and Fandol. System fonts are not used; to use another font, put the file next to your document and load it with Path=./.
One command
texres paper.tex runs LaTeX, BibTeX or Biber as many times as needed. A symlink named pdflatex, xelatex, lualatex, bibtex or biber runs one pass of that tool; named latexmk it behaves like texres. An existing TeX Live is left alone.
SyncTeX, latexdiff, libraries
Writes .synctex.gz for editor jump-to-source. Includes texres latexdiff. A C library and a WebAssembly module compile documents in memory (docs).
Usage and editor setup
Command line
texres paper.tex
# or -pdf, -lualatex
texres -xelatex paper.tex
# write output to build/
texres -output-directory=build paper.tex
# remove cached build files
texres -c paper.tex
# compare two versions
texres latexdiff old.tex new.tex diff.tex && texres diff.tex
texres --help lists all options. Exit status: 0 converged, 1 build failed, 2 usage error.
Editors need the full path to texres. Find it with command -v texres (Homebrew: "$(brew --prefix)/bin/texres").
TeXstudio
"/opt/homebrew/bin/texres" -pdf -interaction=nonstopmode "%.tex"2. Under Build, choose Latexmk as the default compiler.
# Use the full path: macOS apps started from the Dock don't see your shell PATH.
VS Code (LaTeX Workshop)
"latex-workshop.latex.tools": [
{{ "name": "texres", "command": "texres", "args": ["-pdf", "-interaction=nonstopmode", "%DOC%"] }}
],
"latex-workshop.latex.recipes": [{{ "name": "texres", "tools": ["texres"] }}]
The .synctex.gz file next to the PDF lets the editor jump between source and PDF. More: README, error messages, performance. Bug reports and papers that don't compile are welcome at github.com/leoliu0/texres/issues.