Skip to content

Commit c722404

Browse files
authored
chore: deps and shared crates (#12)
Signed-off-by: tison <wander4096@gmail.com>
1 parent 30266e2 commit c722404

File tree

11 files changed

+131
-1187
lines changed

11 files changed

+131
-1187
lines changed

Cargo.lock

Lines changed: 49 additions & 1181 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ version = "0.1.0"
1818
atrium = { path = "atrium-server" }
1919
atrium-client = { path = "atrium-client" }
2020
atrium-core = { path = "atrium-core" }
21+
styled = { path = "crates/styled" }
2122
tests-toolkit = { path = "tests/toolkit" }
2223

2324
# Crates.io dependencies
25+
anstyle = { version = "1.0.10" }
2426
base64 = { version = "0.22.1" }
2527
bytes = { version = "1.10.1" }
2628
clap = { version = "4.5.35", features = ["derive"] }
@@ -45,7 +47,6 @@ regex = { version = "1.11.1" }
4547
reqwest = { version = "0.12.15" }
4648
serde = { version = "1.0", features = ["derive"] }
4749
serde_json = { version = "1.0" }
48-
styled = { version = "0.2.0" }
4950
tempfile = { version = "3.19.1" }
5051
test-harness = { version = "0.3.0" }
5152
thiserror = { version = "2.0" }
@@ -54,6 +55,17 @@ toml = { version = "0.8.20" }
5455
unindent = { version = "0.2.4" }
5556
urlencoding = "2.1.3"
5657

58+
[workspace.lints.rust]
59+
unknown_lints = "deny"
60+
unsafe_code = "deny"
61+
unused_must_use = "deny"
62+
63+
[workspace.lints.clippy]
64+
dbg_macro = "deny"
65+
field_reassign_with_default = "allow"
66+
manual_range_contains = "allow"
67+
new_without_default = "allow"
68+
5769
[profile.release]
5870
debug = true
5971
lto = true

atrium-client/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ tokio = { workspace = true }
2121
toml = { workspace = true }
2222
urlencoding = { workspace = true }
2323

24-
[dev-dependencies]
25-
insta = { workspace = true }
26-
tempfile = { workspace = true }
24+
[lints]
25+
workspace = true

atrium-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ humansize = { workspace = true }
1717
insta = { workspace = true }
1818
tempfile = { workspace = true }
1919

20+
[lints]
21+
workspace = true
22+
2023
[[bench]]
2124
harness = false
2225
name = "benchmark"

atrium-server/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ tokio = { workspace = true }
1919
toml = { workspace = true }
2020
urlencoding = { workspace = true }
2121

22-
[dev-dependencies]
22+
[lints]
23+
workspace = true

crates/styled/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "styled"
3+
4+
edition.workspace = true
5+
version.workspace = true
6+
7+
[dependencies]
8+
anstyle = { workspace = true }
9+
clap = { workspace = true }
10+
11+
[lints]
12+
workspace = true

crates/styled/src/lib.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
pub fn styled() -> clap::builder::Styles {
2+
clap::builder::Styles::styled()
3+
.usage(
4+
anstyle::Style::new()
5+
.bold()
6+
.underline()
7+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::BrightGreen))),
8+
)
9+
.header(
10+
anstyle::Style::new()
11+
.bold()
12+
.underline()
13+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::BrightGreen))),
14+
)
15+
.literal(
16+
anstyle::Style::new()
17+
.bold()
18+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::BrightCyan))),
19+
)
20+
.invalid(
21+
anstyle::Style::new()
22+
.bold()
23+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red))),
24+
)
25+
.error(
26+
anstyle::Style::new()
27+
.bold()
28+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red))),
29+
)
30+
.valid(
31+
anstyle::Style::new()
32+
.bold()
33+
.underline()
34+
.fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green))),
35+
)
36+
.placeholder(
37+
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Cyan))),
38+
)
39+
}

tests/behavior/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ pretty-hex = { workspace = true }
1515
test-harness = { workspace = true }
1616
tests-toolkit = { workspace = true }
1717
tokio = { workspace = true, features = ["full"] }
18+
19+
[lints]
20+
workspace = true

tests/toolkit/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ local-ip-address = { workspace = true }
1111
regex = { workspace = true }
1212
tempfile = { workspace = true }
1313
tokio = { workspace = true, features = ["full"] }
14+
15+
[lints]
16+
workspace = true

xtask/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ serde = { workspace = true }
1212
serde_json = { workspace = true }
1313
styled = { workspace = true }
1414
unindent = { workspace = true }
15+
16+
[lints]
17+
workspace = true

0 commit comments

Comments
 (0)