Texcraft
Texcraft is an experimental project to create a composable, LLVM-style framework for building TeX and other typesetting software. The project manifesto describes the big-picture ideas and goals behind project.
As of 2025, the project is divided into two main sub-projects:
-
Texlang is a framework for building fast and correct TeX language interpreters. It provides APIs for defining TeX primitives and is thus the core of any "TeX engine" built with Texcraft. Texlang's standard library contains implementations of many TeX primitives like
\count
,\def
and\expandafter
. -
Boxworks is an implementation of the typesetting engine inside TeX. It is designed to be fully independent of the TeX language. One of the main goals of Boxworks is to support creating new non-TeX typesetting languages that use the engine for typesetting.
The Texcraft playground is example of what can be built with Texcraft. In the long run the goal is to produce re-implementations of TeX, pdfTeX and other TeX engines using Texcraft.
Design of the documentation
The Texcraft documentation consists of this website along with reference documentation that is generated from the Rust source code.
The documentation is designed with the Divio taxonomy of documentation in mind. In this taxonomy, there are four kinds of documentation: tutorials, how-to guides, references, and explainers. Because Texcraft is a small project so far, we don't have significant documentation of each type. Right now we have:
-
The Texlang user guide, which is mostly a grounds-up tutorial on how to use Texlang. The goal is for it to be possible to read the user guide from the starting introduction through to the end. But we also hope that you can jump into arbitrary sections that interest you, without having to slog through the prior chapters.
-
Reference documentation that is autogenerated using
rustdoc
. -
Occasionally some explainers that are high-level and theoretical. Some parts of the Texlang user guide (such as the manifesto) have this style.
There are currently no how-to guides - we think the tutorials are enough for the moment.
What's in a name?
Texcraft is a contraction of TeX and craft. The verb craft was chosen, in part, to pay homage to Robert Nystrom's book Crafting Interpreters. This book is an inspiration both because of its wonderful exposition of the process of developing a language interpreter and because the book itself is so beautifully typeset. (Unfortunately the methods of the book do not directly apply to TeX because TeX is not context free, has dynamic lexing rules, and many other problems besides.) We hope Texcraft will eventually enable people to craft their own TeX distributions.
The name Texcraft is written using the letter casing rule for proper nouns shared by most languages that use a Roman alphabet: the first letter is in uppercase, and the remaining letters are in lowercase. To quote Robert Bringhurst, "an increasing number of persons and institutions, from archy and mehitabel, to PostScript and TrueType, come to the typographer in search of special treatment [...] Logotypes and logograms push typography in the direction of heiroglyphics, which tend to be looked at rather than read."