Installation¶
Tesserae is on PyPI as tesserae-ui
(you import tess_ui; tesserae on PyPI is an unrelated project):
pip install tesserae-ui
That also installs the rendering engine, tess_re, which is on PyPI as
tesserae-engine (imported as
tess_re), and the libraries Tesserae reads files with. A virtual environment keeps
it tidy:
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install tesserae-ui
python -c "import tess_ui; print('Tesserae is ready')"
Tesserae was for a short time also published on PyPI as tess-ui, with the same package in it. If you installed that, run pip uninstall tess-ui, then pip install tesserae-ui:
the two hold the same tesserae package, so they must not be installed together.
Requirements¶
- Python 3.14 or newer. Tesserae's files are TDL, read with
tess_dl, which needs 3.14. On macOS, thepython3that comes with Xcode's command-line tools is older: install Python from python.org or Homebrew. - Linux x86-64, macOS on Apple silicon, or Windows x64. On these every
dependency, the engine included, installs as a prebuilt wheel. Elsewhere
(Linux ARM, Intel macOS) pip builds
tess_refrom source, which needs Rust; seetess_re's installation guide. - A graphics driver the engine can use. On Linux that means Vulkan.
If a window won't open on Linux¶
A session with no Vulkan driver ends with no GPU adapter available: install your
distribution's Mesa Vulkan driver.
sudo apt install mesa-vulkan-drivers # Debian, Ubuntu
sudo dnf install mesa-vulkan-drivers # Fedora
An X11 session also needs libxkbcommon-x11 (a Wayland session doesn't); if an
error names it:
sudo apt install libxkbcommon-x11-0 # Debian, Ubuntu
sudo dnf install libxkbcommon-x11 # Fedora
On Debian and Ubuntu, python3 -m venv needs sudo apt install python3-venv. On Arch and CachyOS venv comes with
the python package.
Working on Tesserae¶
To change Tesserae itself, work from a checkout:
git clone https://github.com/mindderivative/tess-ui.git
cd tess-ui
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/
python examples/counter/app.py
The last command opens a window with a Count: 0 label and a button that counts.
- A newer or local
tess_re. Tesserae asks for one exacttess_re(tesserae-engine) release, the one its tests were run on, sopip install --upgrade tesserae-enginechanges nothing. To try atess_recheckout you're working on, install it editable withpython -m maturin develop --release --manifest-path /path/to/tess-re/crates/engine-py/Cargo.tomlwith Tesserae's environment active, and reinstall the released one withpip install --force-reinstall tesserae-enginebefore trusting a test run. A test that reads a font file fromtess_re's source tree needsTESS_RE_SOURCE_DIRset to that checkout. - Documentation.
pip install mkdocs mkdocs-material, thenmkdocs serve. The Python and TDL references and the component and stylesheet pages are written from the code (tools/generate_api_docs.py,tools/generate_tdl_docs.py,tools/generate_component_docs.py) and tests fail if they are out of date. - Editor support.
tools/generate_schema.pywrites the JSON schemas of the language; see Editor Support. - Everything else.
DEVELOPING.mdtakes a clean machine to a working checkout (Fedora, Debian and Ubuntu, Arch and CachyOS), and says how to run the whole check,tools/fullcheck.sh.