55bca92691
Core features: - Class 1 T.30 protocol: full send/receive implementation - HDLC: DLE-stuffing, FCS strip, USR5637 bit-reversal handling - T.4 MH encoder/decoder (1728px A4 standard) - Document pipeline: PDF (Ghostscript), PNG, TIFF input - Width clamping: US Letter 1734px → 1728px fax standard - Cover page: CJK rasterization (TW/CN/JP/EN), TIFF + HTML output - OCR verification: Tesseract 5 with eng+chi_tra, CJK space-tolerant - API server (axum): health, send, jobs, cover, retry, cancel - Background worker: auto-poll queue, speed fallback, retry policy - Modem detection, pool management Real-world test results (2026-07-23): - V90 → 25153038: 4 pages, V.17 12000 bps, 2:33 ✅ - USR5637 → 25153038: 4 pages, V.17 12000 bps, 2:26 ✅ - Both faxes confirmed received on remote machine Tested: loopback (100% pixel match), multi-page, all input formats, cover pages, OCR verify, API endpoints, worker processing. 13 unit tests pass, 0 new clippy warnings.
78 lines
1.7 KiB
TOML
78 lines
1.7 KiB
TOML
[package]
|
|
name = "telfax"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "A standalone fax server library and application"
|
|
license = "MIT"
|
|
|
|
[features]
|
|
default = ["server"]
|
|
server = ["dep:axum", "dep:clap", "dep:tokio", "dep:rusqlite", "dep:tower-http", "dep:tracing-subscriber", "dep:lettre"]
|
|
cli = ["dep:clap"]
|
|
|
|
[lib]
|
|
name = "telfax"
|
|
|
|
[[bin]]
|
|
name = "telfax"
|
|
path = "src/main.rs"
|
|
required-features = ["server"]
|
|
|
|
[dependencies]
|
|
# Serial modem
|
|
serialport = "4.3"
|
|
|
|
# Fax codec (T.4/T.6 compression)
|
|
fax = "0.2"
|
|
|
|
# Document handling
|
|
image = "0.25"
|
|
tiff = "0.11"
|
|
lopdf = "0.36"
|
|
imageproc = "0.24"
|
|
rusttype = "0.9"
|
|
|
|
# Error handling
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
base64 = "0.22"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
|
|
# Async (for server mode)
|
|
tokio = { version = "1", features = ["full"], optional = true }
|
|
axum = { version = "0.8", optional = true }
|
|
tower-http = { version = "0.6", features = ["cors"], optional = true }
|
|
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"], optional = true }
|
|
|
|
# CLI / Config
|
|
clap = { version = "4", features = ["derive"], optional = true }
|
|
|
|
# Queue persistence
|
|
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
|
|
|
|
# UUID for job IDs
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
# Date/time
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Config file parsing
|
|
toml = "0.8"
|
|
|
|
# Archive support
|
|
zip = "2.2"
|
|
tar = "0.4"
|
|
flate2 = "1.0"
|
|
unrar = { version = "0.1", optional = true }
|
|
sevenz-rust = { version = "0.6", optional = true }
|
|
|
|
# Email support (for Email-to-Fax and notifications)
|
|
lettre = { version = "0.11", features = ["tokio1-native-tls"], optional = true }
|
|
regex = "1"
|
|
rand = "0.8" |