#jpeg #reference #original

sys jpegxl-sys

Rust wrapper for JPEG XL reference implementation

36 releases

0.12.1+libjxl-0.11.2 Feb 11, 2026
0.11.2+libjxl-0.11.1 Nov 27, 2024
0.10.4+libjxl-0.10.3 Jun 30, 2024
0.10.2+libjxl-0.10.2 Mar 21, 2024
0.1.6 Aug 25, 2020

#507 in Images

Download history 851/week @ 2026-01-19 641/week @ 2026-01-26 745/week @ 2026-02-02 552/week @ 2026-02-09 545/week @ 2026-02-16 753/week @ 2026-02-23 629/week @ 2026-03-02 533/week @ 2026-03-09 505/week @ 2026-03-16 1130/week @ 2026-03-23 1074/week @ 2026-03-30 688/week @ 2026-04-06 724/week @ 2026-04-13 845/week @ 2026-04-20 974/week @ 2026-04-27 603/week @ 2026-05-04

3,215 downloads per month
Used in 6 crates (via jpegxl-rs)

GPL-3.0-or-later

460KB
6K SLoC

C++ 3.5K SLoC // 0.1% comments Rust 1.5K SLoC // 0.2% comments C 871 SLoC // 0.1% comments Bazel 171 SLoC // 0.1% comments Python 97 SLoC // 0.1% comments Shell 76 SLoC // 0.2% comments Go 14 SLoC // 0.2% comments Bitbake 13 SLoC JavaScript 10 SLoC Java 8 SLoC // 0.2% comments Forge Config 2 SLoC Batch 2 SLoC TypeScript 1 SLoC

jpegxl-sys

jpegxl-sys provides a wrapper for the libjxl library. For more details, refer to the original library.

Building

If you wish to specify a custom library path, set the DEP_JXL_LIB environment variable.

To build libjxl and statically link it, use the vendored feature.

Usage

Check out testing units in src/lib.rs for some examples.

Multi-thread

Because libjxl_threads uses std::thread, if you build and statically link libjxl, you need to dynamically link to libc++ or libstdc++.

Using the dynamic library doesn't need this step.

Dependencies