84 lines
1.8 KiB
TOML
84 lines
1.8 KiB
TOML
[package]
|
|
name = "sync-core"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "lib"]
|
|
|
|
[dependencies]
|
|
# FRB
|
|
flutter_rust_bridge = "=2.12.0"
|
|
|
|
# 异步运行时
|
|
tokio = { workspace = true }
|
|
|
|
# HTTP
|
|
reqwest = { version = "0.12", features = ["json", "stream", "rustls-tls"], default-features = false }
|
|
|
|
# 序列化
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
# 数据库
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
|
r2d2 = "0.8"
|
|
r2d2_sqlite = "0.25"
|
|
|
|
# 文件系统
|
|
walkdir = "2"
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
notify-debouncer-full = "0.7.0"
|
|
|
|
# 错误处理
|
|
thiserror = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
|
|
# 日志
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# 并发
|
|
dashmap = "6"
|
|
|
|
# 工具
|
|
uuid = { workspace = true }
|
|
chrono = { workspace = true }
|
|
parking_lot = { workspace = true }
|
|
futures = "0.3"
|
|
futures-util = "0.3"
|
|
bytes = "1"
|
|
filetime = "0.2"
|
|
async-trait = "0.1"
|
|
url = "2"
|
|
urlencoding = "2"
|
|
mime_guess = "2"
|
|
once_cell = "1"
|
|
tokio-util = { version = "0.7", features = ["compat"] }
|
|
|
|
# SSE
|
|
# (已移除 eventsource 0.5 依赖,使用内联 SSE 解析器,避免旧版 tokio/net2 警告)
|
|
|
|
# 平台依赖 (feature-gated)
|
|
[target.'cfg(windows)'.dependencies]
|
|
sync-windows = { path = "../sync-windows", optional = true }
|
|
windows = { version = "0.58", optional = true }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
sync-linux = { path = "../sync-linux", optional = true }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
sync-android = { path = "../sync-android", optional = true }
|
|
jni = { version = "0.21", optional = true }
|
|
|
|
[features]
|
|
default = []
|
|
windows-cfapi = ["sync-windows", "windows"]
|
|
linux-notify = ["sync-linux"]
|
|
android-media = ["sync-android", "jni"]
|
|
event_sink_enabled = []
|
|
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }
|