AstroResearch/Cargo.toml
Asfmq 2a5b1c0c91 feat: 集成 Obscura 进程内无头浏览器、极致编译瘦身 profile 与词典内存优化
- 下载器 Obscura 后备通道拆分为条件编译双路径:
    进程内模式 (obscura-inprocess feature) 通过 spawn_blocking + 单线程
    runtime 驱动 V8 直接抓取;默认外部命令行模式通过 bin/obscura 子进程调用
  - Cargo.toml 新增 obscura-browser/obscura-net 可选依赖与 release-min profile
    (LTO + strip + opt-level="s",二进制 17→8.3 MB,VSZ 1.27G→302M)
  - 词典加载后 shrink_to_fit() 释放预留容量,降低常驻内存
  - README 与 deployment.md 扩写 Obscura 双模式部署及低配服务器优化指南
  - 新增 Obscura mock 集成测试,补齐测试 fixture 字段
2026-06-12 11:15:29 +08:00

62 lines
1.5 KiB
TOML

[package]
name = "astroresearch"
version = "0.1.0"
edition = "2021"
default-run = "astroresearch"
[lib]
path = "src/lib.rs"
[[bin]]
name = "astroresearch"
path = "src/main.rs"
[[bin]]
name = "health_check"
path = "src/bin/health_check.rs"
[dependencies]
tokio = { version = "1", features = ["full"] }
axum = { version = "0.7", features = ["macros", "multipart"] }
tower-http = { version = "0.5", features = ["cors", "fs", "trace"] }
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "sqlite", "chrono", "json"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
reqwest = { version = "0.12", features = ["json", "stream", "multipart", "cookies"] }
dotenvy = "0.15"
quick-xml = { version = "0.31", features = ["serialize"] }
anyhow = "1.0"
thiserror = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
futures-util = { version = "0.3", features = ["io"] }
rand = "0.8"
regex = "1.10"
chrono = { version = "0.4", features = ["serde"] }
sha1 = "0.10"
hmac = "0.12"
base64 = "0.22"
urlencoding = "2.1"
url = "2.5"
html2md = "0.2"
flate2 = "1.1.9"
zip = "8.6.0"
uuid = { version = "1.23.2", features = ["v4"] }
tracing-appender = "0.2.5"
obscura-browser = { path = "libs/obscura/crates/obscura-browser", optional = true }
obscura-net = { path = "libs/obscura/crates/obscura-net", optional = true }
[features]
default = []
obscura-inprocess = ["dep:obscura-browser", "dep:obscura-net"]
[profile.release-min]
inherits = "release"
opt-level = "s"
lto = true
codegen-units = 1
strip = true