[package]
name = "readflow"
version = "0.1.0"
edition = "2021"
authors = ["damai <damai@foshanhuiya.com>"]
description = "ReadFlow - 面向开发者和知识工作者的阅读工具"
repository = "http://192.168.120.110:4000/damai/readflow"
license = "MIT"

[dependencies]
# 核心框架
dioxus = { version = "0.5", features = ["desktop", "launch"] }
dioxus-router = "0.5"
tauri = { version = "2", optional = true }

# 异步运行时
tokio = { version = "1", features = ["full"] }

# 文档处理
pdfium-render = "0.8"
epub = "2.0"
mobi = "0.2"

# Markdown 与代码高亮
pulldown-cmark = "0.9"
syntect = "5.1"
tree-sitter = { version = "0.20", optional = true }

# 数据存储
sled = "0.34"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# 配置管理
config = "0.14"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# HTTP 客户端 (翻译 API)
reqwest = { version = "0.11", features = ["blocking", "json"] }

# 工具
rayon = "1.8"  # 并行计算
dirs = "5"
chrono = { version = "0.4", features = ["serde"] }  # 时间处理
uuid = { version = "1.0", features = ["v4"] }  # UUID 生成

# 文件对话框
rfd = "0.14"

# 正则表达式 (数学公式解析)
regex = "1.10"

# Base64 编码 (PDF 渲染)
base64 = "0.21"

[features]
default = ["desktop"]
desktop = ["dioxus/desktop"]
tauri = ["dep:tauri"]
wasm = ["dioxus/web"]

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true  # 移除调试符号，减小二进制大小

# Windows 特定配置
[target.'cfg(windows)'.dependencies]
winres = "0.1"

[package.metadata.winres]
LegalCopyright = "Copyright (c) 2026 damai"
ProductName = "ReadFlow"
FileDescription = "ReadFlow - 面向开发者和知识工作者的阅读工具"
