Skip to content

Development

Build from source

JPEG XL encoding statically builds libjxl. Install Rust 1.97+, Python 3.12+, CMake, Ninja, NASM on x86, and a C++ compiler before building. AVIF requires system dav1d 1.3+ (brew install dav1d on macOS or apt-get install libdav1d-dev on Ubuntu), also present at runtime. HEIF requires system libheif 1.17+ with an HEVC decoder (libde265) and encoder (x265). On macOS use brew install libheif; on Ubuntu install libheif-dev, libheif-plugin-libde265, and libheif-plugin-x265. The libheif shared library and codec plugins must also be available at runtime. Pillow and pillow-heif are test dependencies only.

uv sync --group dev
maturin develop -G dev --uv --target aarch64-apple-darwin -F vendored,user-provided-webp
cargo fmt --check
cargo clippy -- -D warnings
cargo test
uv run --no-sync pytest
uv run --no-sync scripts/verify_behavior.py

See Benchmarking for performance commands and baseline comparisons.

Optional interoperability dependency

For projects using the Pillow adapter, install Pillow alongside Blanket:

With pip:

pip install pyblanket Pillow

With uv:

uv add pyblanket Pillow