π EBook-RS: Multi-Format Rust EBook Parser and Reader Engine (v0.3.0)
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), LIT (Microsoft Reader), and CBZ (Comic Book ZIP) formats, designed for full feature parity with epub.js and foliate-js.
β‘ Feature Parity Matrix
| Feature | π ebook-rs (v0.3.0) |
π¦ 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 |
| CBZ Comic Archive Support | β Native ZIP Images | β No | β Yes | β No |
| CBR Comic Archive Detection | βΉοΈ Pure-Rust Error Guidance | β No | β Yes (libarchive) | β 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 |
πΊοΈ 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: CBZ (Comic Book Archive) zero-copy base64 image renderer, format auto-detection guard, pure Rust CBR error guidance.
π Quick Start Example
use Book;
π License
Licensed under the MIT License.