Proposal to require Rust to build PDFium

40 views
Skip to first unread message

Lei Zhang

unread,
Feb 13, 2026, 5:53:39 PMFeb 13
to pdfium, Łukasz Anforowicz
Hi folks that build PDFium,

This is an informal proposal to make Rust a requirement for building
PDFium. If you have any questions or concerns about this proposal,
please reply.

There are several pieces of third party Rust code that PDFium either
currently use in an optional manner, or will like to start using in
the future:

1) Skia's Rust PNG decoder to replace libpng in test code and
XFA-enabled builds. [1]
2) Fontations to replace FreeType. [2]
3) jxl-rs for JPEG XL support. [3]

Having Rust as a baseline requirement will make build configs easier
to manage and make the above projects easier to accomplish.

More details and additional data points:
- Developers using PDFium's C++ toolchain can just add
`'checkout_rust': True` to .gclient to get PDFium's Rust toolchain on
the next `gclient sync`.
- This does not require end users to install anything new.
- Currently, there are no plans to write first party PDFium code in Rust.
- Chromium added the Rust build requirement just over 2 years ago. [4]

[1] https://crbug.com/458078747
[2] https://crbug.com/42271123
[3] https://crbug.com/482074621
[4] https://groups.google.com/a/chromium.org/g/chromium-dev/c/i2m-4KB_Duw

geisserml

unread,
Feb 14, 2026, 10:34:38 AMFeb 14
to pdfium
If I understand correctly, the idea is that a Rust toolchain would be required even if the build doesn't actually use any of the new Rust libraries per config?
That doesn't sound ideal from a downstream perspective, not unless one of 1,2,3 would actually become mandatory soon.
IMHO, pdfium's checkout and build process is unusually bloated for a PDF library anyway.

geisserml

unread,
Feb 14, 2026, 11:33:09 AMFeb 14
to pdfium
Also, I wanted to ask, is there are chance that we could get use_system_* options for rustpng, fontations and jxl-rs in the future?
Reply all
Reply to author
Forward
0 new messages