← All repos

hayro

A PDF interpreter and renderer in pure Rust.

Browse cluster: Font design, tooling, and parsing
1,772commits
22contributors
6languages

Tech stack & purpose

Hayro is a pure Rust PDF interpreter and renderer designed to convert PDF files into bitmaps and other formats like SVG. The project comprises multiple specialized crates handling different aspects of PDF processing: `hayro-syntax` provides low-level PDF file reading; `hayro-interpret` interprets PDF content and renders to abstract devices; `hayro-jpeg2000`, `hayro-jbig2`, and `hayro-ccitt` decode various image compression formats used in PDFs; `hayro-cmap` parses character mapping files; and `hayro-postscript` provides a lightweight PostScript scanner. The core rendering crate, `hayro`, performs CPU-based rasterization without GPU dependencies, while `hayro-svg` enables SVG export. All crates are written in memory-safe Rust with unsafe code forbidden via crate-level attributes (except where optional SIMD features are used for performance). The project is validated against a comprehensive test suite of over 1000 PDFs drawn from the pdf.js, PDFBox, and a large-scale PDF corpus.

Languages

Rust
95.8%
JavaScript
1.8%
Python
1.5%
CSS
0.5%
HTML
0.2%
Shell
0.1%

Contributors