feat(server): 初始化 rtty-server 项目结构与基础依赖
This commit is contained in:
31
Cargo.toml
Normal file
31
Cargo.toml
Normal file
@@ -0,0 +1,31 @@
|
||||
[package]
|
||||
name = "rtty-server"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
# 1. 异步运行时与 Web 框架
|
||||
tokio = { version = "1.38", features = ["full"] }
|
||||
axum = { version = "0.7", features = ["ws"] }
|
||||
tower-http = { version = "0.5", features = ["cors", "trace"] }
|
||||
|
||||
# 2. PTY 驱动与终端状态引擎
|
||||
portable-pty = "0.8"
|
||||
alacritty_terminal = "0.24"
|
||||
|
||||
# 3. 序列化与数据传输 (支持移动端 JSON 重排协议)
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
||||
# 4. 日志与并发工具
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
anyhow = "1.0"
|
||||
dashmap = "6.0" # 高并发线程安全的 SessionMap
|
||||
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
Reference in New Issue
Block a user