rat_memcache 0.2.4

高性能 Memcached 协议兼容服务器,支持双层缓存和持久化存储
Documentation
[package]
name = "rat_memcache"
version = "0.2.4"
edition = "2024"
authors = ["0ldm0s <oldmos@gmail.com>"]
description = "高性能 Memcached 协议兼容服务器,支持双层缓存和持久化存储"
repository = "https://github.com/0ldm0s/rat_memcache"
license = "LGPL-3.0-or-later"
readme = "README.md"
homepage = "https://github.com/0ldm0s/rat_memcache"
documentation = "https://docs.rs/rat_memcache"
keywords = ["memcached", "cache", "server", "database", "performance"]
categories = ["caching", "database", "network-programming", "memory-management"]

[[bin]]
name = "rat_memcached"
path = "src/bin/rat_memcached.rs"
doc = false
required-features = ["server"]



[dependencies]

# 日志系统
rat_logger = "0.2.8"

# 持久化存储(可选)
melange_db = { version = "0.2.5", optional = true }

# 压缩算法
lz4 = "1.24"

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

# 序列化
serde = { version = "1.0", features = ["derive"] }
bincode = "2.0"
tempfile = "3.8"

# 时间处理
chrono = { version = "0.4", features = ["serde"] }

# 并发数据结构
dashmap = "5.5"
parking_lot = "0.12"

# 错误处理
thiserror = "1.0"
anyhow = "1.0"

# 原子操作和同步
crossbeam = "0.8"

# 哈希算法
fxhash = "0.2"

# 字节操作
bytes = "1.5"

# 配置管理
toml = "0.8"

# 命令行参数解析
clap = "4.4"

# 系统信息获取
sysinfo = "0.30"

# Unix 系统调用
[target.'cfg(unix)'.dependencies]
libc = "0.2"
mimalloc = { version = "0.1", optional = true, default-features = false }

# Windows API
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_Networking_WinSock"] }
mimalloc = { version = "0.1", optional = true, default-features = false }

[features]
# 默认只包含基本功能,用户按需选择
default = ["cache-lib", "ttl-support"]

# 核心库功能 - 纯内存缓存
cache-lib = []

# 服务器功能 - 完整的memcached服务器实现
server = ["full-features"]

# 完整功能 - 包含所有库功能但不包含服务器二进制
full-features = ["cache-lib", "ttl-support", "metrics", "melange-storage", "lz4-compression", "mimalloc-allocator"]

# 可选功能组件
ttl-support = []
metrics = []
melange-storage = ["melange_db"]
lz4-compression = []
mimalloc-allocator = ["mimalloc"]

# 压缩特性(互斥,用于 MelangeDB)
compression-none = ["melange_db/compression-none"]
compression-lz4 = ["melange_db/compression-lz4"]
compression-zstd = ["melange_db/compression-zstd"]

[dev-dependencies]
tokio-test = "0.4"
criterion = "0.5"
tempfile = "3.8"