# π EBook-RS: Multi-Format Rust EBook Parser and Reader Engine (v0.4.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
| **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 |
| **Footnote & Endnote Previewer** | β
`extract_footnotes()` | β No | β
Yes | β No |
| **OPDS Catalog Feed Client** | β
OPDS 1.2 & 2.0 | β No | β
Yes | β No |
| **Resource Streaming API** | β
`AssetDeliveryStrategy` | β
Blob URIs | β
Blob URIs | β No |
| **Embedded Script Sanitizer** | β
`strip_script_content()` | β
Sandbox | β
Sandbox | β No |
| **Fixed Layout (FXL) Scaling** | β
`compute_fxl_scale()` | β
Yes | β
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 |
| **WebAssembly Browser Support** | β
`wasm-bindgen` | β JS Only | β JS Only | β No |
| **Embedded HTTP Reader App** | β
Built-in Server | β No | β No | β No |
| **Readium Webpub Manifest Export** | β
`to_webpub_manifest` | β No | β
Yes | β No |
---
## π Quick Start Example
```rust
use ebook_rs::{Book, AssetDeliveryStrategy};
fn main() -> Result<(), String> {
// Auto-detects and opens EPUB, MOBI, AZW3, FB2, KEPUB, LIT, or CBZ files
let mut book = Book::from_file("book.epub")?;
println!("Title: {}", book.metadata().title);
println!("Sections: {}", book.spine().len());
// Extract footnotes for popup previewing
let section = book.get_section(0)?;
let footnotes = section.extract_footnotes();
for fn_item in footnotes {
println!("Footnote [{}]: {}", fn_item.label, fn_item.plain_text);
}
Ok(())
}
```
---
## πΊοΈ Project Roadmap
- [x] **v0.1.0**: Core EPUB 2/3 parser, CFI Engine, Location Progress, Annotations, Web UI Server, WASM Bindings.
- [x] **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.
- [x] **v0.2.5**: Readium Webpub Manifest Export (`application/webpub+json`), PalmDOC LZ77 distance fallback.
- [x] **v0.3.0**: **CBZ (Comic Book Archive)** zero-copy base64 image renderer, format auto-detection guard.
- [x] **v0.4.0**: **Footnote Popup Previewer**, **OPDS 1.2/2.0 Catalog Feed Client**, **Asset Delivery Resource Streaming API**, **Embedded Script Sanitizer**, **Fixed Layout (FXL) Viewport Scaling Matrix**, **HTTP Range Request Header Resolver**.
---
## π Documentation & Wiki
Detailed API documentation and integration guides are available in [docs/API.md](docs/API.md).
---
## π License
Licensed under the MIT License. Copyright (c) 2026 SV-Stark.