taffylite
A deliberately thin PyO3 binding of the taffy
flexbox layout engine, packaged as the optional layout engine behind saitenka's LayoutBackend
seam (overlay/render/layout_backend.py, issue #146).
It is a fixed-size geometry solver: every leaf's width/height is supplied by the caller (Pillow has already measured the text on the Python side), so taffylite has no measure callback and no Rust-side cache — just a pure flexbox solve. Its one job is robustness: a mature CSS engine in place of hand-rolled offset arithmetic. Perf is a wash with the pure-Python default backend (both µs-scale, dominated by Pillow raster), so it is opt-in and parity-gated, never the default.
Why a Rust extension is opt-in
DefaultLayoutBackend (pure Python, zero-dependency) is always available and byte-identical. taffylite
is additive: it needs a per-platform prebuilt wheel or a Rust toolchain to build from source. It builds
and loads cleanly on free-threaded CPython (pyo3 0.29, gil_used = false) — that is not a blocker,
just packaging friction the pure-Python core avoids.
Published on PyPI as three wheels per platform (pyo3 abi3 + abi3t, PEP 803): abi3 (GIL 3.13+), cp314t
(free-threaded 3.14), abi3t (FT and GIL 3.15+), for Linux, macOS-arm64, and Windows — pull it via
saitenka's extra, uv tool install 'saitenka[layout-engine]', or directly:
uv add taffylite # or: pip install taffylite
API
import taffylite
# Row-stack geometry (the LayoutBackend.cumulative primitive):
starts, ends = taffylite.column(heights, gaps, top_pad)
# A generic fixed-size flex tree (used by the conformance fixtures):
t = taffylite.Tree()
a = t.add_leaf(width=40, height=20)
b = t.add_leaf(width=40, height=20)
root = t.add_flex([a, b], direction="column", gap=8, padding=(0, 12, 0, 0))
t.set_root(root)
rects = t.compute() # [(x, y, w, h), …] index-aligned to handles
The measure-callback / Rust-cache design for the future intra-block text-layout track (taffy driving
line wrap, calling back into Pillow) lives in the experiment/layout-engine-bakeoff worktree; it is out
of scope here (a non-goal of #146) and intentionally not ported.
Licence
MIT OR Apache-2.0, matching taffy and pyo3. See LICENSE and NOTICE.
Metadata
Release files for taffylite 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taffylite-0.2.0.tar.gz | 16.6 kB | Details |
Built distributions (wheels)
Total release size: 3.8 MB
Release files / taffylite-0.2.0.tar.gz
| Download URL | taffylite-0.2.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d472daeeee7a7f74451b498d41853d7f8febc89690096ce68378011c89191c8d
|
|
BLAKE2b-256 checksum How to use checksums |
9559f0552da0aa81118f91ac21ff47cb840fd25d5946f61096bb98a870421c69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp315-abi3.abi3t-win_amd64.whl
| Download URL | taffylite-0.2.0-cp315-abi3.abi3t-win_amd64.whl |
|---|---|
| Size | 252.0 kB |
| Tags | CPython 3.15 Windows x86-64 abi3 abi3t |
|
SHA-256 checksum How to use checksums |
b871594304767da4ac22718c8d1527d35cf5667967522a90c3ed40a8c8d27301
|
|
BLAKE2b-256 checksum How to use checksums |
981073b00311ca7414a5d51ae94b5be0d88f90913dacdb617e178f6e7e39bb34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
| Download URL | taffylite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 357.7 kB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t |
|
SHA-256 checksum How to use checksums |
606ce942d1a2986d610eca1ed3bee4828b20e83253b8c780a5978e52cb584862
|
|
BLAKE2b-256 checksum How to use checksums |
7def5c7ee33d0ff22f63f34e4ee6eb9fdde9e9e3661355ffa4faed4f7c2ffb40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
| Download URL | taffylite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 325.0 kB |
| Tags | CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t |
|
SHA-256 checksum How to use checksums |
5b4d951174d7fdf13b58531226d27355411e95500f7abed7082e6e08c5668bf6
|
|
BLAKE2b-256 checksum How to use checksums |
2e9b8fe39f0d4159508dc8e7f505b7e90a1cce2b60e8def71cbb69f53b30b941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
| Download URL | taffylite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl |
|---|---|
| Size | 314.9 kB |
| Tags | CPython 3.15 abi3 abi3t macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3c7bee082aba6626b8ff8d518b8542bd55dc14e2898ff9ecb3dfe8c78fa41c2d
|
|
BLAKE2b-256 checksum How to use checksums |
e4486b4c8f5db4bf52b287441887913316c6867ca9147c22721889b8b3165a26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp314-cp314t-win_amd64.whl
| Download URL | taffylite-0.2.0-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 250.6 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c5e58790a3bd765def7a2ebbefd980de2b997026255e91fc1251741fac42169a
|
|
BLAKE2b-256 checksum How to use checksums |
8ee0ab055d52db91eb716356a6a9dc2d383850b9710ebb0d652b5039d83f6362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | taffylite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 356.2 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f0f5f20b69a1665e8a55bea53f9cdd845cc6c1d2beebefb60fc08df476ebb659
|
|
BLAKE2b-256 checksum How to use checksums |
f7a1a3f6044c0ffda71a4eb056fafdfe405c5b1b91fee96ea1e78ff83b3bc48c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | taffylite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 323.6 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
69ba41ae39b90ead5e65020eb13dd4f6b7b00ec11a12c07426b2b9fce5ff5c29
|
|
BLAKE2b-256 checksum How to use checksums |
562e81361245ed6b1889befc67d4b27e0a0ffce198a2e99591c17bbd7c18a236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | taffylite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 312.5 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4857a6a50d551cd45e961e742b7c54d165485647c6abd0bec13361df7c461e04
|
|
BLAKE2b-256 checksum How to use checksums |
946eedc4ab39066ce4b6360de9233fdaf094bb3771531c6e7c585121142630ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp313-abi3-win_amd64.whl
| Download URL | taffylite-0.2.0-cp313-abi3-win_amd64.whl |
|---|---|
| Size | 250.2 kB |
| Tags | CPython 3.13 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3b4328db8fa818af5e734d27f16200c4d968cad98a66c015d6627db2abec289d
|
|
BLAKE2b-256 checksum How to use checksums |
466abc6aa73e35ce37b4bd5adcdd41eda3f2c899a279197457af35b58ae0925c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl
| Download URL | taffylite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 356.2 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
62fad359565a8e1d5d7fc03dd4afaab5c275fc2e0747415a442bd5119a68b5af
|
|
BLAKE2b-256 checksum How to use checksums |
57cb49bd66cca1c42953d7b282dc16e54f52b49c24cb9dd8e88f4aef702018e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl
| Download URL | taffylite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 323.8 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a4d4b831f1fa6df4c9774771fbb2c6df75ed48beb89ac50b88f11dbed9a2aa6d
|
|
BLAKE2b-256 checksum How to use checksums |
a2bad5d1272b20b6b95aa20d80c37d923cf40ce45e6612ca835380eb3b500355
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / taffylite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl
| Download URL | taffylite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 312.7 kB |
| Tags | CPython 3.13 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
150a2d4a68a64c18205fe5b7171aec0d45b1620a48ca5d4e405f0d0b0f8864e9
|
|
BLAKE2b-256 checksum How to use checksums |
2736ea50f31ca590c649e9fae76bbcf5faf255da3762d4f61398866f3b35792b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log