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