[package] name = "xianscan-rust" version = "0.5.0-beta.8" edition = "2021" description = "Local-first translation studio for manga, manhwa, and manhua." homepage = "https://xianscan.arbenger.com" repository = "https://github.com/ArbenApura/xianscan-rust" license = "MIT" readme = "README.md" [[bin]] name = "xianscan" path = "src/main.rs" [features] default = [] directml = ["ort/directml"] cuda = ["ort/cuda"] coreml = ["ort/coreml"] embed-models = [] embed-web = [] [dependencies] # Async Web & HTTP Server tokio = { version = "1.43", features = ["full"] } axum = { version = "0.8", features = ["multipart", "ws"] } tower = "0.5" tower-http = { version = "0.6", features = ["cors", "trace", "fs", "compression-full", "catch-panic"] } # Serialization & JSON serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" regex = "1.11" sha2 = "0.10" hex = "0.4" # ACCESS TOKEN AND ML SECRET (ALREADY IN Cargo.lock VIA OTHER CRATES) getrandom = "0.2" # Computer Vision, Geometry & Math image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp", "bmp", "tiff"] } imageproc = "0.25" ndarray = { version = "0.16", features = ["std"] } geo = "0.29" zip = { version = "2.2", default-features = false, features = ["deflate"] } rayon = "1.10" # ONNX Runtime ML Engine ort = { version = "2.0.0-rc.9", default-features = false, features = ["download-binaries", "copy-dylibs", "tls-rustls"] } num_cpus = "1.16" mimalloc = { version = "0.1", default-features = false } # SQLite Database rusqlite = { version = "0.32", features = ["bundled"] } r2d2 = "0.8" r2d2_sqlite = "0.25" # Embedded Assets rust-embed = "8.5" include_dir = "0.7" # Logging & Error Handling tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } anyhow = "1.0" thiserror = "2.0" # Terminal output styling colored = "2" # Windows DXGI Adapter Enumeration + ANSI/VT console enablement [target.'cfg(windows)'.dependencies] windows = { version = "0.58", features = ["Win32_Graphics_Dxgi", "Win32_System_Console", "Win32_System_JobObjects", "Win32_System_Threading", "Win32_Foundation", "Win32_Security"] } [build-dependencies] # MODEL HASH CHECK FOR embed-models BUILDS (FEAT-008 PHASE 3); BOTH ALREADY IN Cargo.lock sha2 = "0.10" hex = "0.4" [target.'cfg(windows)'.build-dependencies] winres = "0.1" # PR_SET_PDEATHSIG FOR THE NODE CHILD (ALREADY IN Cargo.lock AS A TRANSITIVE DEPENDENCY) [target.'cfg(target_os = "linux")'.dependencies] libc = "0.2" [target.'cfg(target_os = "macos")'.dependencies] metal = "0.29" # HTTP Client for DeepSeek / AI APIs reqwest = { version = "0.12", features = ["json", "stream"] } [dev-dependencies] tempfile = "3.17" ab_glyph = "0.2" # DEV BUILD SPEED OPTIMIZATIONS: # 1. Keeps external heavy crates (ort, image, ndarray, axum) at opt-level 3 so ML runs at full release speed. # 2. Leaves your code in src/ at opt-level 0 for sub-second re-compilations. # 3. Reduces debug symbols from 2 to 1 (line tables only), cutting linking times by over 60%. [profile.dev] debug = 1 [profile.dev.package."*"] opt-level = 3 # PRODUCTION RELEASE PROFILE: # - opt-level 3: Maximum SIMD & compiler optimizations # - lto = "thin": Link-Time Optimization across crates for maximum inlining and throughput # - codegen-units = 1: Global code optimization # - strip = true: Strips all debug info, reducing binary size by ~50% # - panic = "abort": Removes unwinding tables for smaller binary and faster execution [profile.release] opt-level = 3 lto = "thin" codegen-units = 1 strip = true panic = "abort"