Files
markbase/markbase-core/Cargo.toml
T
Warren 0802a47a5f
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Remove PostgreSQL support: pure SQLite architecture
BREAKING CHANGE: Remove all PostgreSQL functionality

Changes:
- Remove dependencies: tokio-postgres, postgres from Cargo.toml
- Delete files: pg_client.rs (330 lines), sync.rs (370 lines), provider/pg.rs (300 lines)
- Remove modules from lib.rs: pg_client, sync
- Remove pg module from provider/mod.rs
- Remove PostgreSQL sync code from server.rs (lines 126-165)
- Remove auth_db field and with_sync() from auth.rs
- Simplify SSH server to use SqliteProvider only
- Convert sync API endpoints to return 410 Gone with error message
- Remove [postgresql] config section from markbase.toml

Rationale:
- Simplify architecture by using SQLite exclusively
- Remove complexity of PostgreSQL synchronization
- Reduce dependencies and maintenance burden
- SQLite is sufficient for MarkBase use case

Code removed: ~1000 lines
Files deleted: 3
Files modified: 8
2026-10-24 19:47:10 +08:00

108 lines
3.9 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "markbase-core"
version = "0.2.0"
edition = "2021"
[dependencies]
# === 核心压缩库(Phase 1-2已完成)===
zip = "0.6" # ZIP格式(稳定版本)
tar = "0.4.46" # TAR格式
flate2 = "1.1" # GZIP格式(已有)
tempfile = "3.12" # 临时目录(解压时需要)
# === 可选压缩库(Phase 3,争议格式)===
unrar = { version = "0.4.0", optional = true } # RAR解压 ⚠️法律风险
xz2 = { version = "0.1.7", optional = true } # XZ格式 ⚠️外部依赖
sevenz-rust = { version = "0.6.1", optional = true } # 7z格式 ⚠️库不稳定(修正版本号)
anyhow = "1"
axum = { version = "0.7", features = ["macros"] }
bcrypt = "0.16"
bytes = "1"
chrono = { version = "0.4", features = ["serde"] }
lazy_static = "1.5"
once_cell = "1.21"
regex = "1"
clap = { version = "4", features = ["derive"] }
dav-server = "0.11"
filetree = { path = "../filetree" }
futures-util = "0.3"
log = "0.4"
env_logger = "0.11"
pulldown-cmark = "0.12"
rusqlite = { version = "0.32", features = ["bundled"] }
sled = "1.0.0-alpha.124"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
hmac = "0.12"
filetime = "0.2"
base64 = "0.22"
tokio = { version = "1", features = ["full"] }
russh = "0.61.2"
russh-keys = "0.50.0-beta.7"
russh-sftp = "2.3.0"
ssh2 = "0.9.4"
ssh-key = "0.7.0-rc.10"
rand = "0.8"
axum-extra = { version = "0.9", features = ["multipart"] }
http = "1"
tokio-util = { version = "0.7", features = ["io"] }
zstd = "0.13"
lz4_flex = "0.11"
hex = "0.4"
toml = "0.8"
uuid = { version = "1", features = ["v4"] }
xmltree = "0.12"
dashmap = "6.1"
md5 = "0.8"
adler = "1.0"
byteorder = "1.5"
x25519-dalek = "2.0"
ed25519-dalek = { version = "2.0", features = ["rand_core"] }
aes = "0.8"
ctr = "0.9"
cipher = "0.4"
aes-gcm = "0.10" # Phase 1: AES-256-GCM AEAD(性能优化)
chacha20 = "0.9" # Phase 5: ChaCha20 stream cipher(OpenSSH chacha20-poly1305)
poly1305 = "0.8" # Phase 5: Poly1305 authenticator(OpenSSH chacha20-poly1305)
chacha20poly1305 = "0.10" # Phase 5: ChaCha20-Poly1305 AEAD(备用)
nix = { version = "0.29", features = ["poll", "fs"] } # Phase 14: OpenSSH风格的poll()和非阻塞I/O(fs feature包含fcntl)
rusty-s3 = "0.10" # S3 API 签名(AWS Signature V4)
ureq = "2.12" # 輕量同步 HTTP 客戶端
reqwest = { version = "0.12", optional = true } # Async HTTP client for AsyncS3Vfs
rayon = "1.10" # Phase 4: 并行加密
tower-http = { version = "0.5", features = ["cors"] }
url = "2" # URL 解析(rusty-s3 依賴)
xattr = "1.0" # Extended attributes support (AFP_AfpInfo, Time Machine)
# === SMB/CIFS Client (Phase 1) ===
smb2 = { path = "../vendor/smb2" } # Pure-Rust SMB2/3 client library with pipelined I/O
# === SMB/CIFS Server (Phase 2) — optional (vendored) ===
smb-server = { path = "../vendor/smb-server", optional = true, default-features = false }
async-trait = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
# === LDAP Authentication (Phase 2) ===
ldap3 = { version = "0.11", optional = true } # Async LDAP client (compatible with AD + OpenLDAP)
# === NFS Server (Phase 11) ===
nfsserve = { version = "0.11", optional = true } # NFSv3/NFSv4 server implementation
[features]
default = [] # 默认不启用可选格式
optional-formats = ["unrar", "xz2", "sevenz-rust"] # 争议格式可选启用
smb-server = ["dep:smb-server"] # SMB server feature flag
async-vfs = ["dep:reqwest"] # Async VfsBackend trait + native async S3
ldap = ["dep:ldap3"] # LDAP authentication provider
nfs = ["dep:nfsserve"] # NFSv3/NFSv4 server feature flag
[dev-dependencies]
# tempfile moved to dependencies (needed for archive extraction)
[[bin]]
name = "markbase-core"
path = "src/main.rs"