π EBook-RS: Multi-Format Rust EBook Parser and Reader Engine (v0.2.5)
ebook-rs is a high-performance, 100% pure Rust parser and reader engine for EPUB 2, EPUB 3, MOBI, AZW3 (KF8), FB2 (FictionBook 2), KEPUB (Kobo EPUB), and LIT (Microsoft Reader) formats, designed for full feature parity with epub.js and foliate-js.
β‘ Feature Parity Matrix
| Feature | π ebook-rs (v0.2.5) |
π¦ epub.js |
π foliate-js |
π¦ rbook |
|---|---|---|---|---|
| EPUB 2 & 3 Support | β Yes | β Yes | β Yes | β Yes |
| MOBI & AZW3 Support | β Native PalmDOC LZ77 | β No | β Yes | β No |
| FB2 (FictionBook 2) Support | β Native XML | β No | β Yes | β No |
| KEPUB & LIT Support | β Native | β No | β Yes | β No |
| Full-Text Search Engine | β 0.59ms / 0-alloc | β Third-party | β Yes | β No |
| EPUB Canonical Fragment Identifiers (CFI) | β Complete IDPF Spec | β Yes | β Yes | β No |
| Locations & Progress Indexing | β Discrete Chunks | β οΈ Slow (DOM) | β Yes | β No |
| Font De-Obfuscation (IDPF & Adobe) | β Native SHA-1/XOR | β No | β Yes | β No |
| Pre-Display Transformation Hooks | β Pipeline Hooks | β No | β Yes | β No |
| EPUB 3 Landmarks & Page-List | β Full Parser | β Yes | β Yes | β No |
| Base64 Asset Inlining | β Auto Images/Fonts/CSS | β Blob URIs | β Blob URIs | β No |
| WebAssembly Browser Support | β
wasm-bindgen |
β JS Only | β JS Only | β No |
| Embedded HTTP Reader App | β Built-in Server | β No | β No | β No |
| Double-Spread & Continuous Scroll | β CSS Column / Vertical | β Yes | β Yes | β No |
| Readium Webpub Manifest Export | β
to_webpub_manifest |
β No | β Yes | β No |
| CBZ / CBR Comic Archive Support | β Planned v0.3.0 | β No | β Yes | β No |
| PDF Document Rendering Bridge | β Planned v0.3.0 | β No | β Yes | β No |
πΊοΈ Project Roadmap
- v0.1.0: Core EPUB 2/3 parser, CFI Engine, Location Progress, Annotations, Web UI Server, WASM Bindings.
- v0.2.0: Native Multi-Format Support (MOBI, AZW3, FB2, KEPUB, LIT), IDPF & Adobe Font De-obfuscation, EPUB 3 Landmarks & Page List, Pre-Display Transformation Hooks.
- v0.2.5: Readium Webpub Manifest Export (
application/webpub+json), PalmDOC LZ77 distance fallback, FB2 image reference matching fix, complex CFI range assertion safety. - v0.3.0 (Planned): PDF Rendering Bridge, CBZ/CBR Comic Archive Parser.
π Quick Start Example
use Book;
π License
Dual-licensed under MIT or Apache-2.0.