97 lines
2.4 KiB
TOML
97 lines
2.4 KiB
TOML
[package]
|
||
name = "htknow"
|
||
version = "0.1.0"
|
||
edition = "2024"
|
||
|
||
[dependencies]
|
||
anyhow = "1.0.100"
|
||
axum = { version = "0.8.8", features = ["multipart"] }
|
||
chrono = "0.4"
|
||
tokio = { version = "1", features = ["full"] }
|
||
tokio-stream = "0.1"
|
||
tokio-util = { version = "0.7", features = ["io"] }
|
||
tokio-cron-scheduler = "0.13"
|
||
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls", "sqlite", "chrono", "derive"] }
|
||
lazy_static = "1.4"
|
||
log = "0.4"
|
||
log4rs = "1.3.0"
|
||
|
||
lancedb = "0.27.2"
|
||
arrow-array = "57"
|
||
arrow-schema = "57"
|
||
futures = "0.3"
|
||
bytes = "1"
|
||
reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls-native-roots", "http2", "stream"] }
|
||
|
||
once_cell = "1"
|
||
|
||
serde = { version = "1.0", features = ["derive"] }
|
||
serde_json = "1.0"
|
||
|
||
# Swagger/OpenAPI 文档
|
||
utoipa = { version = "5.3", features = ["axum_extras", "chrono"] }
|
||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum", "vendored"] }
|
||
|
||
tantivy = "0.24.2"
|
||
jieba-rs = "0.6"
|
||
|
||
sha2 = "0.10"
|
||
hex = "0.4"
|
||
|
||
rust-embed = "8"
|
||
mime_guess = "2"
|
||
uuid = "1.19.0"
|
||
base64 = "0.22.1"
|
||
|
||
# 知识图谱相关依赖
|
||
petgraph = "0.6" # 图数据结构
|
||
bincode = "1.3" # 序列化图结构
|
||
aho-corasick = "1.0" # 高效字符串匹配(词典)
|
||
regex = "1" # 正则表达式
|
||
|
||
# PDF 操作
|
||
lopdf = { version = "0.36", default-features = false }
|
||
tempfile = "3"
|
||
|
||
# Excel 解析
|
||
calamine = "0.26"
|
||
|
||
# 压缩文件解压
|
||
zip = { version = "2", default-features = false, features = ["aes-crypto", "bzip2", "deflate", "deflate64", "lzma", "time", "zstd"] }
|
||
tar = "0.4"
|
||
flate2 = "1"
|
||
bzip2 = "0.4"
|
||
xz2 = "0.1"
|
||
|
||
# 错误处理
|
||
thiserror = "1"
|
||
|
||
# 编码处理(ZIP 中文文件名 GBK/GB18030 解码)
|
||
encoding_rs = "0.8"
|
||
|
||
# etcd 配置中心(可选)
|
||
etcd-client = { version = "0.14", optional = true }
|
||
serde_with = "3.16.1"
|
||
sysinfo = "0.29"
|
||
# jemalloc allocator
|
||
# Note: profiling is only needed for debug/analysis, disabled in release for better performance
|
||
tikv-jemallocator = { version = "0.6" }
|
||
tikv-jemalloc-ctl = { version = "0.6", optional = true, features = ["use_std"] }
|
||
|
||
[features]
|
||
default = []
|
||
etcd = ["etcd-client"]
|
||
# Enable jemalloc profiling for debug/analysis builds only
|
||
profiling = ["tikv-jemalloc-ctl"]
|
||
|
||
[dev-dependencies]
|
||
http-body-util = "0.1"
|
||
tower = "0.5"
|
||
|
||
[profile.release]
|
||
opt-level = "s"
|
||
lto = "thin"
|
||
codegen-units = 1
|
||
panic = "abort"
|
||
strip = "symbols"
|