百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jxl-rs

> 编程语言
开源

JPEG XL 在 Rust (jxl-rs) 中 jxl-rs 是一个高性能、符合标准且内存安全的 JPEG XL 解码器,使用 Rust 编写。它是 JPEG XL 解码器,可在 Linux、Windows、MacOS 和 Android 上运行。

581 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

JPEG XL 在 Rust (jxl-rs) 中 jxl-rs 是一个高性能、符合标准且内存安全的 JPEG XL 解码器,使用 Rust 编写。它是 JPEG XL 解码器,可在 Linux、Windows、MacOS 和 Android 上运行。

JPEG XL in Rust (jxl-rs)

jxl-rs is a high-performance, conforming, and memory-safe JPEG XL decoder written in Rust.

It is the JPEG XL decoder implementation used in Google Chrome / Chromium and Mozilla Firefox.

JPEG XL was standardized in 2022 as ISO/IEC 18181. While libjxl (C++) is the official ISO/IEC 18181-4 reference software, jxl-rs is a pure-Rust implementation developed within the JPEG XL project. It is not (yet) an official reference implementation, it aims for full specification conformance, memory safety, and high decoding performance across diverse hardware architectures.

The performance of jxl-rs closely matches (and sometimes exceeds) the C++ reference implementation, while having improved support for progressive rendering and lower memory requirements.

Safety

The vast majority of the code uses safe Rust. Where unsafe is needed for performance benefits (including SIMD), we require unsafe code to have extensive safety comments and to be reviewed by a non-author Unsafe Rust expert.

Workspace Crates

  • jxl: Core JPEG XL decoder library.
  • jxl-image-rs-integration: Integration for the image crate.
  • jxl_cli: CLI decoding and benchmarking tool.
  • jxl_cms, jxl_simd, jxl_transforms, jxl_macros: Internal crates for color management, SIMD acceleration, transforms, and macros.

Usage

bash
# Build
cargo build --release --bin jxl_cli

# Decode an image (PNG, PPM, PGM, APNG, EXR)
target/release/jxl_cli input.jxl output.png

# Print image metadata
target/release/jxl_cli input.jxl --info

# Benchmark decoding speed
target/release/jxl_cli input.jxl --speedtest --num-reps 10

The jxl crate is also available on crates.io for use as a library.

image crate integration

Add the integration crate and register the JPEG XL decoder before using image's format-agnostic loading APIs:

toml
[dependencies]
image = "0.25"
jxl-image-rs-integration = "0.6"
rust
jxl_image_rs_integration::register_image_decoding_hook();

let decoded = image::open("input.jxl")?;
# Ok::(())

Registration enables both .jxl extension handling and automatic detection of bare codestreams and JPEG XL containers.

Testing

bash
# Run workspace tests
cargo test --release --all

# Run Shuttle concurrency tests
cargo test --release --features shuttle shuttle

To run property-based tests with extended budget:

bash
ARBTEST_BUDGET_MS=10000 cargo test --release --all
SHUTTLE_ITERATIONS=100 cargo nextest run --features shuttle -- shuttle

Conformance & Bug Reports

We strive to decode all conformant JPEG XL bitstreams correctly. If you encounter an image that decodes with the reference implementation djxl (from libjxl) but fails or renders incorrectly with jxl-rs, please open an issue.

Community & Contact

  • Main C++ Repository: libjxl/libjxl
  • Discord: Join the JPEG XL Discord Server
  • JPEG XL Website: jpeg.org/jpegxl & jpegxl.info
  • Contributing: Please see CONTRIBUTING.md for contribution guidelines and CLA requirements.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言