Skip to content

Commit 67fc49a

Browse files
committed
refactor(core): 下沉持久化至 core,统一 workspace 依赖,补全文档注释
- 新增 persist feature(默认关闭),含 key.rs / profile.rs - Profile TOML 涵盖 host_port、inlet_port、last_ticket、relay 配置 - 首次加载时自动创建默认 profile.toml - CLI 删除 key.rs / relay.rs / lib.rs / app.rs,合并入 main.rs - TUI 删除 config.rs,state.rs 改用 sculk_core::persist::Profile - 共享依赖提升至 workspace.dependencies - 补全 core 各模块及 TUI state.rs 的文档注释
1 parent 98d6819 commit 67fc49a

28 files changed

Lines changed: 831 additions & 664 deletions

Cargo.lock

Lines changed: 76 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ members = ["core", "cli", "tui"]
33
resolver = "3"
44

55
[workspace.dependencies]
6-
anyhow = "1.0.102"
7-
iroh = "0.96.1"
8-
tokio = { version = "1.49.0", features = ["full"] }
9-
tracing = "0.1.44"
10-
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
11-
clap = { version = "4.5.60", features = ["derive"] }
6+
sculk-core = { path = "core" }
7+
anyhow = "1.0"
8+
iroh = "0.96"
9+
tokio = { version = "1.49", features = ["full"] }
10+
tracing = "0.1"
11+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
12+
clap = { version = "4.5", features = ["derive"] }
13+
arboard = "3.6"
14+
dirs = "6"
15+
rand = "0.10"
16+
serde = { version = "1", features = ["derive"] }
17+
toml = "0.9"
18+
url = "2.5"

cli/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
sculk-core = { path = "../core" }
7+
sculk-core = { workspace = true, features = ["persist"] }
88
anyhow.workspace = true
9-
arboard = "3.6.1"
9+
arboard.workspace = true
1010
clap.workspace = true
11-
dirs = "6.0.0"
12-
rand = "0.10.0"
1311
tokio.workspace = true
1412
tracing.workspace = true
1513
tracing-subscriber.workspace = true

0 commit comments

Comments
 (0)