Skip to content

Commit f348b65

Browse files
committed
move serde_json to workspace. refactor stacks common cargo
1 parent cb16f1a commit f348b65

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@ rand = "0.8"
2222
rand_chacha = "0.3.1"
2323
serde = "1"
2424
serde_derive = "1"
25+
serde_json = { version = "1.0", features = ["arbitrary_precision", "unbounded_depth"] }
2526
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
2627
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
2728
tikv-jemallocator = "0.5.4"
2829
thiserror = "1.0.65"
2930
toml = "0.5.6"
3031

3132
# Use a bit more than default optimization for
32-
# dev builds to speed up test execution
33+
# dev builds to speed up test execution
3334
[profile.dev]
3435
opt-level = 1
3536

3637
# Use release-level optimization for dependencies
3738
# This slows down "first" builds on development environments,
38-
# but won't impact subsequent builds.
39+
# but won't impact subsequent builds.
3940
[profile.dev.package."*"]
4041
opt-level = 3
4142

stacks-common/Cargo.toml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,23 @@ name = "stacks_common"
3030
path = "./src/libcommon.rs"
3131

3232
[dependencies]
33+
chrono = "0.4.19"
34+
curve25519-dalek = { version = "4.1.3", features = ["serde"] }
35+
ed25519-dalek = { workspace = true }
36+
hashbrown = { workspace = true }
37+
lazy_static = { workspace = true }
3338
rand = { workspace = true }
39+
ripemd = "0.1.1"
3440
serde = { workspace = true , features = ["derive"] }
3541
serde_derive = { workspace = true }
42+
serde_json = { workspace = true }
3643
sha3 = "0.10.1"
37-
ripemd = "0.1.1"
38-
lazy_static = { workspace = true }
3944
slog = { workspace = true }
4045
slog-term = "2.6.0"
41-
slog-json = { version = "2.3.0", optional = true }
42-
chrono = "0.4.19"
43-
hashbrown = { workspace = true }
46+
47+
# Optional dependencies
4448
rusqlite = { workspace = true, optional = true }
49+
slog-json = { version = "2.3.0", optional = true }
4550

4651
[target.'cfg(unix)'.dependencies]
4752
nix = {version = "0.23", optional = true}
@@ -57,48 +62,36 @@ winapi = { version = "0.3", features = [
5762
[target.'cfg(windows)'.dev-dependencies]
5863
winapi = { version = "0.3", features = ["fileapi", "processenv", "winnt"] }
5964

60-
[dependencies.serde_json]
61-
version = "1.0"
62-
features = ["arbitrary_precision", "unbounded_depth"]
63-
64-
[dependencies.ed25519-dalek]
65-
workspace = true
66-
67-
[dependencies.curve25519-dalek]
68-
version = "4.1.3"
69-
features = ["serde"]
70-
71-
[dependencies.time]
72-
version = "0.2.23"
73-
features = ["std"]
74-
7565
[target.'cfg(not(target_family = "wasm"))'.dependencies]
7666
secp256k1 = { version = "0.24.3", features = ["serde", "recovery"] }
7767

7868
[target.'cfg(target_family = "wasm")'.dependencies]
7969
libsecp256k1 = { version = "0.7.0" }
8070

71+
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies]
72+
sha2 = { version = "0.10", features = ["asm"] }
73+
74+
[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies]
75+
sha2 = { version = "0.10" }
76+
8177
[dev-dependencies]
8278
rand_core = { workspace = true }
8379
proptest = "1.6.0"
8480

81+
[build-dependencies]
82+
toml = { workspace = true }
83+
8584
[features]
8685
default = ["developer-mode", "ctrlc-handler", "http-parser"]
8786
developer-mode = []
87+
# Enables graceful shutdown handling for Ctrl+C (SIGINT) signals on Unix-like systems.
88+
# This pulls in the `nix` dependency.
8889
ctrlc-handler = ["dep:nix"]
90+
# Enables a lightweight, internal HTTP/1.x parser.
8991
http-parser = []
9092
slog_json = ["slog-json"]
9193
rusqlite = ["dep:rusqlite"]
9294
testing = []
9395
serde = []
9496
bech32_std = []
9597
bech32_strict = []
96-
97-
[build-dependencies]
98-
toml = { workspace = true }
99-
100-
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies]
101-
sha2 = { version = "0.10", features = ["asm"] }
102-
103-
[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies]
104-
sha2 = { version = "0.10" }

0 commit comments

Comments
 (0)