-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
80 lines (64 loc) · 2.21 KB
/
Cargo.toml
File metadata and controls
80 lines (64 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[package]
name = "boko"
version = "0.2.0"
edition = "2024"
description = "Fast ebook conversion library for EPUB and Kindle formats"
license = "MIT"
repository = "https://github.com/zacharydenton/boko"
homepage = "https://github.com/zacharydenton/boko"
documentation = "https://docs.rs/boko"
readme = "README.md"
keywords = ["ebook", "epub", "mobi", "azw3", "kindle"]
categories = ["parsing", "encoding"]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["cli"]
cli = ["dep:clap", "dep:serde", "dep:serde_json"]
wasm = ["wasm-bindgen", "console_error_panic_hook"]
[dependencies]
wasm-bindgen = { version = "0.2", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }
quick-xml = "0.39"
zip = { version = "8.1", default-features = false, features = ["deflate-flate2"] }
percent-encoding = "2.3"
# High-performance byte operations (SIMD-accelerated)
memchr = "2.7"
bstr = { version = "1.11", default-features = false, features = ["alloc"] }
html5ever = "0.38"
cssparser = "0.36"
selectors = "0.35"
precomputed-hash = "0.1"
# Encoding detection and conversion (UTF-8, CP1252, etc.)
encoding_rs = "0.8"
# Base64 encoding for KFX raw media
base64 = "0.22"
# Ion binary format parsing for KFX dump tool
ion-rs = { version = "1.0.0-rc.11", features = ["experimental-reader-writer"] }
# SHA1 hashing for KFX content hashes (minimal, WASM-compatible)
sha1_smol = { version = "1.0", features = ["std"] }
# CLI argument parsing (only for binary)
clap = { version = "4", features = ["derive"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
# Native: use fast zlib-rs
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
flate2 = { version = "1.1", default-features = false, features = ["zlib-rs"] }
# WASM: use pure-Rust backend
[target.'cfg(target_arch = "wasm32")'.dependencies]
flate2 = { version = "1.1", default-features = false, features = ["rust_backend"] }
js-sys = "0.3"
[dev-dependencies]
tempfile = "3.14"
proptest = "1.6"
criterion = "0.8"
[[bin]]
name = "boko"
required-features = ["cli"]
[[bin]]
name = "kfx-dump"
path = "src/bin/kfx-dump.rs"
required-features = ["cli"]
[[bench]]
name = "conversion"
harness = false