Skip to content

Commit

Permalink
workspace: Defines cuprate members as workspace dependencies (#326)
Browse files Browse the repository at this point in the history
Defines cuprate members as workspace dependencies

- Defines cuprate members as workspace dependencies
- Changed all `path` import into `workspace = true`

Co-authored-by: Boog900 <boog900@tutanota.com>
  • Loading branch information
SyntheticBird45 and Boog900 authored Oct 24, 2024
1 parent b8e2d00 commit 63216ae
Show file tree
Hide file tree
Showing 21 changed files with 143 additions and 114 deletions.
29 changes: 29 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,35 @@ opt-level = 1
opt-level = 3

[workspace.dependencies]
# Cuprate members
cuprate-fast-sync = { path = "consensus/fast-sync" ,default-features = false}
cuprate-consensus-rules = { path = "consensus/rules" ,default-features = false}
cuprate-constants = { path = "constants" ,default-features = false}
cuprate-consensus = { path = "consensus" ,default-features = false}
cuprate-consensus-context = { path = "consensus/context" ,default-features = false}
cuprate-cryptonight = { path = "cryptonight" ,default-features = false}
cuprate-helper = { path = "helper" ,default-features = false}
cuprate-epee-encoding = { path = "net/epee-encoding" ,default-features = false}
cuprate-fixed-bytes = { path = "net/fixed-bytes" ,default-features = false}
cuprate-levin = { path = "net/levin" ,default-features = false}
cuprate-wire = { path = "net/wire" ,default-features = false}
cuprate-p2p = { path = "p2p/p2p" ,default-features = false}
cuprate-p2p-core = { path = "p2p/p2p-core" ,default-features = false}
cuprate-dandelion-tower = { path = "p2p/dandelion-tower" ,default-features = false}
cuprate-async-buffer = { path = "p2p/async-buffer" ,default-features = false}
cuprate-address-book = { path = "p2p/address-book" ,default-features = false}
cuprate-blockchain = { path = "storage/blockchain" ,default-features = false}
cuprate-database = { path = "storage/database" ,default-features = false}
cuprate-database-service = { path = "storage/service" ,default-features = false}
cuprate-txpool = { path = "storage/txpool" ,default-features = false}
cuprate-pruning = { path = "pruning" ,default-features = false}
cuprate-test-utils = { path = "test-utils" ,default-features = false}
cuprate-types = { path = "types" ,default-features = false}
cuprate-json-rpc = { path = "rpc/json-rpc" ,default-features = false}
cuprate-rpc-types = { path = "rpc/types" ,default-features = false}
cuprate-rpc-interface = { path = "rpc/interface" ,default-features = false}

# External dependencies
anyhow = { version = "1.0.89", default-features = false }
async-trait = { version = "0.1.82", default-features = false }
bitflags = { version = "2.6.0", default-features = false }
Expand Down
50 changes: 25 additions & 25 deletions binaries/cuprated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated"

[dependencies]
# TODO: after v1.0.0, remove unneeded dependencies.
cuprate-consensus = { path = "../../consensus" }
cuprate-fast-sync = { path = "../../consensus/fast-sync" }
cuprate-consensus-context = { path = "../../consensus/context" }
cuprate-consensus-rules = { path = "../../consensus/rules" }
cuprate-cryptonight = { path = "../../cryptonight" }
cuprate-helper = { path = "../../helper" }
cuprate-epee-encoding = { path = "../../net/epee-encoding" }
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
cuprate-levin = { path = "../../net/levin" }
cuprate-wire = { path = "../../net/wire" }
cuprate-p2p = { path = "../../p2p/p2p" }
cuprate-p2p-core = { path = "../../p2p/p2p-core" }
cuprate-dandelion-tower = { path = "../../p2p/dandelion-tower" }
cuprate-async-buffer = { path = "../../p2p/async-buffer" }
cuprate-address-book = { path = "../../p2p/address-book" }
cuprate-blockchain = { path = "../../storage/blockchain", features = ["service"] }
cuprate-database-service = { path = "../../storage/service" }
cuprate-txpool = { path = "../../storage/txpool" }
cuprate-database = { path = "../../storage/database" }
cuprate-pruning = { path = "../../pruning" }
cuprate-test-utils = { path = "../../test-utils" }
cuprate-types = { path = "../../types" }
cuprate-json-rpc = { path = "../../rpc/json-rpc" }
cuprate-rpc-interface = { path = "../../rpc/interface" }
cuprate-rpc-types = { path = "../../rpc/types" }
cuprate-consensus = { workspace = true }
cuprate-fast-sync = { workspace = true }
cuprate-consensus-context = { workspace = true }
cuprate-consensus-rules = { workspace = true }
cuprate-cryptonight = { workspace = true }
cuprate-helper = { workspace = true }
cuprate-epee-encoding = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-levin = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p = { workspace = true }
cuprate-p2p-core = { workspace = true }
cuprate-dandelion-tower = { workspace = true }
cuprate-async-buffer = { workspace = true }
cuprate-address-book = { workspace = true }
cuprate-blockchain = { workspace = true, features = ["service"] }
cuprate-database-service = { workspace = true }
cuprate-txpool = { workspace = true }
cuprate-database = { workspace = true }
cuprate-pruning = { workspace = true }
cuprate-test-utils = { workspace = true }
cuprate-types = { workspace = true }
cuprate-json-rpc = { workspace = true }
cuprate-rpc-interface = { workspace = true }
cuprate-rpc-types = { workspace = true }

# TODO: after v1.0.0, remove unneeded dependencies.
anyhow = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ authors = ["Boog900"]
repository = "https://github.com/Cuprate/cuprate/tree/main/consensus"

[dependencies]
cuprate-helper = { path = "../helper", default-features = false, features = ["std", "asynch", "num"] }
cuprate-consensus-rules = { path = "./rules", features = ["rayon"] }
cuprate-types = { path = "../types" }
cuprate-consensus-context = { path = "./context" }
cuprate-helper = { workspace = true, default-features = false, features = ["std", "asynch", "num"] }
cuprate-consensus-rules = { workspace = true, features = ["rayon"] }
cuprate-types = { workspace = true }
cuprate-consensus-context = { workspace = true }

cfg-if = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -28,8 +28,8 @@ hex = { workspace = true }
rand = { workspace = true }

[dev-dependencies]
cuprate-test-utils = { path = "../test-utils" }
cuprate-consensus-rules = {path = "./rules", features = ["proptest"]}
cuprate-test-utils = { workspace = true }
cuprate-consensus-rules = { workspace = true, features = ["proptest"]}

hex-literal = { workspace = true }
curve25519-dalek = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions consensus/context/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ license = "MIT"
authors = ["SyntheticBird","Boog900"]

[dependencies]
cuprate-consensus-rules = { path = "../rules", features = ["proptest"]}
cuprate-helper = { path = "../../helper", default-features = false, features = ["std", "cast", "num", "asynch"] }
cuprate-types = { path = "../../types", default-features = false, features = ["blockchain"] }
cuprate-consensus-rules = { workspace = true, features = ["proptest"]}
cuprate-helper = { workspace = true, default-features = false, features = ["std", "cast", "num", "asynch"] }
cuprate-types = { workspace = true, default-features = false, features = ["blockchain"] }

futures = { workspace = true, features = ["std", "async-await"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"]}
Expand All @@ -24,4 +24,4 @@ thread_local = { workspace = true }
hex = { workspace = true }

[lints]
workspace = true
workspace = true
12 changes: 6 additions & 6 deletions consensus/fast-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ name = "cuprate-fast-sync-create-hashes"
path = "src/create.rs"

[dependencies]
cuprate-blockchain = { path = "../../storage/blockchain" }
cuprate-consensus = { path = ".." }
cuprate-consensus-rules = { path = "../rules" }
cuprate-consensus-context = { path = "../context" }
cuprate-types = { path = "../../types" }
cuprate-helper = { path = "../../helper", features = ["cast"] }
cuprate-blockchain = { workspace = true }
cuprate-consensus = { workspace = true }
cuprate-consensus-rules = { workspace = true }
cuprate-consensus-context = { workspace = true }
cuprate-types = { workspace = true }
cuprate-helper = { workspace = true, features = ["cast"] }

clap = { workspace = true, features = ["derive", "std"] }
hex = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions consensus/rules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ proptest = ["cuprate-types/proptest"]
rayon = ["dep:rayon"]

[dependencies]
cuprate-constants = { path = "../../constants", default-features = false, features = ["block"] }
cuprate-helper = { path = "../../helper", default-features = false, features = ["std", "cast"] }
cuprate-types = { path = "../../types", default-features = false }
cuprate-cryptonight = {path = "../../cryptonight"}
cuprate-constants = { workspace = true, default-features = false, features = ["block"] }
cuprate-helper = { workspace = true, default-features = false, features = ["std", "cast"] }
cuprate-types = { workspace = true, default-features = false }
cuprate-cryptonight = { workspace = true }

monero-serai = { workspace = true, features = ["std"] }
curve25519-dalek = { workspace = true, features = ["alloc", "zeroize", "precomputed-tables"] }
Expand Down
2 changes: 1 addition & 1 deletion helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ thread = ["std", "dep:target_os_lib"]
tx = ["dep:monero-serai"]

[dependencies]
cuprate-constants = { path = "../constants", optional = true, features = ["block"] }
cuprate-constants = { workspace = true, optional = true, features = ["block"] }

chrono = { workspace = true, optional = true, features = ["std", "clock"] }
crossbeam = { workspace = true, optional = true }
Expand Down
6 changes: 3 additions & 3 deletions net/epee-encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ default = ["std"]
std = ["dep:thiserror", "bytes/std", "cuprate-fixed-bytes/std"]

[dependencies]
cuprate-helper = { path = "../../helper", default-features = false, features = ["cast"] }
cuprate-fixed-bytes = { path = "../fixed-bytes", default-features = false }
cuprate-helper = { workspace = true, default-features = false, features = ["cast"] }
cuprate-fixed-bytes = { workspace = true, default-features = false }

paste = "1.0.15"
ref-cast = "1.0.23"
Expand All @@ -27,4 +27,4 @@ thiserror = { workspace = true, optional = true}
hex = { workspace = true, features = ["default"] }

[lints]
workspace = true
workspace = true
4 changes: 2 additions & 2 deletions net/levin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ default = []
tracing = ["dep:tracing", "tokio-util/tracing"]

[dependencies]
cuprate-helper = { path = "../../helper", default-features = false, features = ["cast"] }
cuprate-helper = { workspace = true, default-features = false, features = ["cast"] }

cfg-if = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -30,4 +30,4 @@ tokio = { workspace = true, features = ["full"] }
futures = { workspace = true, features = ["std"] }

[lints]
workspace = true
workspace = true
10 changes: 5 additions & 5 deletions net/wire/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ default = []
tracing = ["cuprate-levin/tracing"]

[dependencies]
cuprate-levin = { path = "../levin" }
cuprate-epee-encoding = { path = "../epee-encoding" }
cuprate-fixed-bytes = { path = "../fixed-bytes" }
cuprate-types = { path = "../../types", default-features = false, features = ["epee"] }
cuprate-helper = { path = "../../helper", default-features = false, features = ["map"] }
cuprate-levin = { workspace = true }
cuprate-epee-encoding = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-types = { workspace = true, default-features = false, features = ["epee"] }
cuprate-helper = { workspace = true, default-features = false, features = ["map"] }

bitflags = { workspace = true, features = ["std"] }
bytes = { workspace = true, features = ["std"] }
Expand Down
10 changes: 5 additions & 5 deletions p2p/address-book/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ authors = ["Boog900"]


[dependencies]
cuprate-constants = { path = "../../constants" }
cuprate-pruning = { path = "../../pruning" }
cuprate-p2p-core = { path = "../p2p-core" }
cuprate-constants = { workspace = true }
cuprate-pruning = { workspace = true }
cuprate-p2p-core = { workspace = true }

tower = { workspace = true, features = ["util"] }
tokio = { workspace = true, features = ["time", "fs", "rt"]}
Expand All @@ -26,9 +26,9 @@ rand = { workspace = true, features = ["std", "std_rng"] }
borsh = { workspace = true, features = ["derive", "std"]}

[dev-dependencies]
cuprate-test-utils = {path = "../../test-utils"}
cuprate-test-utils = { workspace = true }

tokio = { workspace = true, features = ["rt-multi-thread", "macros"]}

[lints]
workspace = true
workspace = true
10 changes: 5 additions & 5 deletions p2p/p2p-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ default = ["borsh"]
borsh = ["dep:borsh", "cuprate-pruning/borsh"]

[dependencies]
cuprate-helper = { path = "../../helper", features = ["asynch"], default-features = false }
cuprate-wire = { path = "../../net/wire", features = ["tracing"] }
cuprate-pruning = { path = "../../pruning" }
cuprate-helper = { workspace = true, features = ["asynch"], default-features = false }
cuprate-wire = { workspace = true, features = ["tracing"] }
cuprate-pruning = { workspace = true }

tokio = { workspace = true, features = ["net", "sync", "macros", "time", "rt", "rt-multi-thread"]}
tokio-util = { workspace = true, features = ["codec"] }
Expand All @@ -29,10 +29,10 @@ hex-literal = { workspace = true }
borsh = { workspace = true, features = ["derive", "std"], optional = true }

[dev-dependencies]
cuprate-test-utils = { path = "../../test-utils" }
cuprate-test-utils = { workspace = true }

hex = { workspace = true, features = ["std"] }
tokio-test = { workspace = true }

[lints]
workspace = true
workspace = true
22 changes: 11 additions & 11 deletions p2p/p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ license = "MIT"
authors = ["Boog900"]

[dependencies]
cuprate-constants = { path = "../../constants" }
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
cuprate-wire = { path = "../../net/wire" }
cuprate-p2p-core = { path = "../p2p-core", features = ["borsh"] }
cuprate-address-book = { path = "../address-book" }
cuprate-pruning = { path = "../../pruning" }
cuprate-helper = { path = "../../helper", features = ["asynch"], default-features = false }
cuprate-async-buffer = { path = "../async-buffer" }
cuprate-types = { path = "../../types", default-features = false }
cuprate-constants = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p-core = { workspace = true, features = ["borsh"] }
cuprate-address-book = { workspace = true }
cuprate-pruning = { workspace = true }
cuprate-helper = { workspace = true, features = ["asynch"], default-features = false }
cuprate-async-buffer = { workspace = true }
cuprate-types = { workspace = true, default-features = false }

monero-serai = { workspace = true, features = ["std"] }

Expand All @@ -35,10 +35,10 @@ tracing = { workspace = true, features = ["std", "attributes"] }
borsh = { workspace = true, features = ["derive", "std"] }

[dev-dependencies]
cuprate-test-utils = { path = "../../test-utils" }
cuprate-test-utils = { workspace = true }
indexmap = { workspace = true }
proptest = { workspace = true }
tokio-test = { workspace = true }

[lints]
workspace = true
workspace = true
4 changes: 2 additions & 2 deletions pruning/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ default = []
borsh = ["dep:borsh"]

[dependencies]
cuprate-constants = { path = "../constants" }
cuprate-constants = { workspace = true }

thiserror = { workspace = true }

borsh = { workspace = true, features = ["derive", "std"], optional = true }

[lints]
workspace = true
workspace = true
10 changes: 5 additions & 5 deletions rpc/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ default = ["dummy", "serde"]
dummy = []

[dependencies]
cuprate-epee-encoding = { path = "../../net/epee-encoding", default-features = false }
cuprate-json-rpc = { path = "../json-rpc", default-features = false }
cuprate-rpc-types = { path = "../types", features = ["serde", "epee"], default-features = false }
cuprate-helper = { path = "../../helper", features = ["asynch"], default-features = false }
cuprate-epee-encoding = { workspace = true, default-features = false }
cuprate-json-rpc = { workspace = true, default-features = false }
cuprate-rpc-types = { workspace = true, features = ["serde", "epee"], default-features = false }
cuprate-helper = { workspace = true, features = ["asynch"], default-features = false }

anyhow = { workspace = true }
axum = { version = "0.7.5", features = ["json"], default-features = false }
Expand All @@ -26,7 +26,7 @@ paste = { workspace = true }
futures = { workspace = true }

[dev-dependencies]
cuprate-test-utils = { path = "../../test-utils" }
cuprate-test-utils = { workspace = true }

axum = { version = "0.7.5", features = ["json", "tokio", "http2"] }
serde_json = { workspace = true, features = ["std"] }
Expand Down
10 changes: 5 additions & 5 deletions rpc/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ serde = ["dep:serde", "cuprate-fixed-bytes/serde"]
epee = ["dep:cuprate-epee-encoding"]

[dependencies]
cuprate-epee-encoding = { path = "../../net/epee-encoding", optional = true }
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
cuprate-types = { path = "../../types", default-features = false, features = ["epee", "serde"] }
cuprate-epee-encoding = { workspace = true, optional = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-types = { workspace = true, default-features = false, features = ["epee", "serde"] }

paste = { workspace = true }
serde = { workspace = true, optional = true }

[dev-dependencies]
cuprate-test-utils = { path = "../../test-utils" }
cuprate-test-utils = { workspace = true }

serde = { workspace = true }
serde_json = { workspace = true }

[lints]
workspace = true
workspace = true
Loading

0 comments on commit 63216ae

Please sign in to comment.