feat(server): 初始化 rtty-server 项目结构与基础依赖

This commit is contained in:
2026-07-31 16:38:02 +08:00
parent c78bfd39ec
commit 01b3bea1c6
11 changed files with 159 additions and 2 deletions

31
Cargo.toml Normal file
View 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