A foundational piece for the COOLJAPAN ecosystem landed on February 25.
Today we released FOP 0.1.0 — a complete, high-performance reimplementation of Apache FOP (Formatting Objects Processor) written entirely in Rust.
No JVM. No C++. No external binaries.
Just clean, memory-safe, blazing-fast XSL-FO processing that compiles to a single static binary.
Why FOP 0.1.0 is a game changer
For 20+ years, enterprise document generation meant running Apache FOP (Java) or commercial alternatives (RenderX, Antenna House).
These tools are powerful but suffer from:
- JVM startup overhead (~2 seconds)
- High memory usage (~50 KB/page)
- Garbage collection pauses
- Complex deployment (JAR hell)
FOP 0.1.0 ends all of that.
It delivers 10–1200× faster performance while using 1/10th the memory — all in pure Rust with zero unsafe code in the hot path.
Technical Deep Dive: How We Rebuilt Apache FOP
The architecture mirrors the original FOP pipeline but is radically simplified and optimized in Rust:
-
FO Tree (parsing)
quick-xml+ zero-copyCow<'static, str>parsing. 294 XSL-FO 1.1 properties with full inheritance and cascading. -
Area Tree (layout engine)
- Knuth-Plass optimal paragraph breaking (the gold standard)
- Advanced table layout (fixed, proportional, auto)
- Multi-page breaking, footnotes, floats, keeps
- 9 list marker styles + custom graphics
-
Renderer (PDF output)
Pure-Rust PDF writer with font embedding, hyperlinks, bookmarks, text extraction, and compression.
Also supports SVG and plain-text output.
Key Rust advantages:
- Arena allocation + index-based trees (no
Rc<RefCell<>>overhead) - Static dispatch everywhere possible
- SIMD-accelerated text shaping and image processing (via OxiMedia integration)
<10 MBbinary size (vs 15 MB+ Java JAR)
What’s inside 0.1.0
- Full XSL-FO 1.1 compliance (root, page-sequence, flow, block, table, list, graphics, links)
- Internationalization: Japanese, Chinese, Korean, Arabic, bidirectional text
- Python bindings (
fop2on PyPI) and WASM bindings (@cooljapan/fopon npm) - 52 integration tests + 383 unit tests (Clippy0 + fail0 enforced)
- Benchmarks: 1000-page document parsed in <50 ms (vs ~500 ms Java FOP)
This is the foundation
FOP is now the official document generation layer for the COOLJAPAN stack:
- RusMES (mail server) uses it for PDF invoice/statement generation
- OxiMedia pipes rendered pages into video streams
- OxiRS knowledge graphs can be exported as beautifully formatted PDFs
- Future integration with OxiLean for mathematically verified document layouts
Repository: https://github.com/cool-japan/fop
Star the repo if you’re tired of JVM-based document generation.
The era of “just run the Java JAR” is over.
Pure Rust document processing is here — and it’s ridiculously fast.
— KitaSan at COOLJAPAN OÜ
February 25, 2026