Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use workspace metadata and deps #900

Merged
merged 6 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[workspace.package]
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/paritytech/parity-common"
repository = "https://github.com/paritytech/parity-common"

[workspace]
resolver = "2"
members = [
Expand All @@ -16,3 +23,59 @@ members = [
"ethereum-types",
"ethbloom",
]

[workspace.dependencies]
serde_json = "1.0.41"
criterion = "0.5.1"
rand = { version = "0.8.0", default-features = false }
hex-literal = "0.4.1"
scale-info = { version = ">=1.0, <3", default-features = false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was >= 0.9, < 3, why did you change it? the reason we set it this way is to allow upsteam users to update scale-info without having to update crates in parity-common.

Copy link
Contributor Author

@jasl jasl Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this version range comes from https://github.com/paritytech/parity-common/pull/900/files#diff-c949d3988c105a100fde1d974b36302b74911bbb90efeb2581f94e6379a39ce5L20

I align with the highest one. Should I need to separate them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, i see. ok, let's keep it >= 1.0, < 3. i think nobody should be using scale-info 0.9 at this point

quickcheck = "1"
rustc-hex = { version = "2.0.1", default-features = false }
static_assertions = "1.0.0"
arbitrary = "1.0"
tiny-keccak = "2.0"
crunchy = { version = "0.2.2", default-features = false }
serde = { version = "1.0.101", default-features = false }
codec = { package = "parity-scale-codec", version = "3.7.4", default-features = false }
log = { version = "0.4.17", default-features = false }
schemars = ">=0.8.12"
rand_xorshift = "0.3.0"
tempfile = "3.1.0"
smallvec = "1.0.0"
parking_lot = "0.12.0"
num_cpus = "1.10.1"
regex = "1.3.1"
rocksdb = { version = "0.22.0", default-features = false }
alloc_counter = "0.0.4"
sysinfo = "0.30.13"
ctrlc = "3.1.4"
chrono = "0.4"
num-traits = { version = "0.2", default-features = false }
integer-sqrt = "0.1"
bytes = { version = "1", default-features = false }
syn = "2.0.72"
quote = "1.0.2"
proc-macro2 = "1.0.8"
byteorder = { version = "1.4.2", default-features = false }
hex = { version = "0.4", default-features = false }
num-bigint = "0.4.0"
rug = { version = "1.6.0", default-features = false }
jsonschema = { version = "0.23", default-features = false }
serde_derive = "1.0.101"

ethbloom = { path = "./ethbloom", default-features = false }
ethereum-types = { path = "./ethereum-types" }
fixed-hash = { path = "./fixed-hash", default-features = false }
uint = { path = "./uint", default-features = false }
uint-crate = { path = "./uint", package = "uint", default-features = false }
primitive-types = { path = "./primitive-types", default-features = false }
impl-codec = { path = "./primitive-types/impls/codec", default-features = false }
impl-num-traits = { path = "./primitive-types/impls/num-traits", default-features = false }
impl-rlp = { path = "./primitive-types/impls/rlp", default-features = false }
impl-serde = { path = "./primitive-types/impls/serde", default-features = false }
kvdb = { path = "./kvdb" }
kvdb-shared-tests = { path = "./kvdb-shared-tests" }
keccak-hash = { path = "./keccak-hash" }
rlp = { path = "./rlp" }
rlp-derive = { path = "./rlp-derive" }
22 changes: 12 additions & 10 deletions bounded-collections/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
[package]
name = "bounded-collections"
version = "0.2.3"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/paritytech/parity-common"
description = "Bounded types and their supporting traits"
edition = "2021"
readme = "README.md"
rust-version = "1.79.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
serde = { version = "1.0.101", default-features = false, optional = true, features=["alloc", "derive"] }
codec = { version = "3.7.4", default-features = false, features = ["max-encoded-len"], package = "parity-scale-codec" }
scale-info = { version = ">=1.0, <3", features = ["derive"], default-features = false }
log = { version = "0.4.17", default-features = false }
schemars = { version = ">=0.8.12", default-features = true, optional = true }
serde = { workspace = true, features = ["alloc", "derive"], optional = true }
codec = { workspace = true, features = ["max-encoded-len"] }
scale-info = { workspace = true, features = ["derive"] }
log = { workspace = true }
schemars = { workspace = true, optional = true }

[dev-dependencies]
serde_json = "1.0.41"
serde_json = { workspace = true }

[features]
default = ["std"]
Expand Down
31 changes: 15 additions & 16 deletions ethbloom/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
[package]
name = "ethbloom"
version = "0.14.1"
authors = ["Parity Technologies <[email protected]>"]
description = "Ethereum bloom filter"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/ethbloom"
homepage = "https://github.com/paritytech/parity-common"
repository = "https://github.com/paritytech/parity-common"
edition = "2021"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
tiny-keccak = { version = "2.0", features = ["keccak"] }
crunchy = { version = "0.2.2", default-features = false, features = ["limit_256"] }
fixed-hash = { path = "../fixed-hash", version = "0.8", default-features = false }
impl-serde = { path = "../primitive-types/impls/serde", version = "0.5", default-features = false, optional = true }
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.4", default-features = false, optional = true }
impl-codec = { version = "0.7.0", path = "../primitive-types/impls/codec", default-features = false, optional = true }
scale-info = { version = ">=1.0, <3", features = ["derive"], default-features = false, optional = true }
tiny-keccak = { workspace = true, features = ["keccak"] }
crunchy = { workspace = true, features = ["limit_256"] }
fixed-hash = { workspace = true }
impl-serde = { workspace = true, optional = true }
impl-rlp = { workspace = true, optional = true }
impl-codec = { workspace = true, optional = true }
scale-info = { workspace = true, features = ["derive"], optional = true }

[dev-dependencies]
criterion = "0.5.1"
rand = "0.8.0"
hex-literal = "0.4.1"
criterion = { workspace = true }
rand = { workspace = true, default-features = true }
hex-literal = { workspace = true }

[features]
default = ["std", "rlp", "serialize", "rustc-hex"]
Expand Down
27 changes: 14 additions & 13 deletions ethereum-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
[package]
name = "ethereum-types"
version = "0.15.1"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/paritytech/parity-common"
description = "Ethereum types"
edition = "2021"
rust-version = "1.60.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
ethbloom = { path = "../ethbloom", version = "0.14", optional = true, default-features = false }
fixed-hash = { path = "../fixed-hash", version = "0.8", default-features = false, features = ["rustc-hex"] }
uint-crate = { path = "../uint", package = "uint", version = "0.10", default-features = false }
primitive-types = { path = "../primitive-types", version = "0.13", features = ["rustc-hex"], default-features = false }
impl-serde = { path = "../primitive-types/impls/serde", version = "0.5.0", default-features = false, optional = true }
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.4", default-features = false, optional = true }
impl-codec = { version = "0.7.0", path = "../primitive-types/impls/codec", default-features = false, optional = true }
scale-info = { version = ">=1.0, <3", features = ["derive"], default-features = false, optional = true }
ethbloom = { workspace = true, optional = true }
fixed-hash = { workspace = true, features = ["rustc-hex"] }
uint-crate = { workspace = true }
primitive-types = { workspace = true, features = ["rustc-hex"] }
impl-serde = { workspace = true, optional = true }
impl-rlp = { workspace = true, optional = true }
impl-codec = { workspace = true, optional = true }
scale-info = { workspace = true, features = ["derive"], optional = true }

[dev-dependencies]
serde_json = "1.0.41"
serde_json = { workspace = true }

[features]
default = ["std", "ethbloom", "rlp", "serialize"]
Expand Down
27 changes: 13 additions & 14 deletions fixed-hash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
[package]
name = "fixed-hash"
version = "0.8.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/paritytech/parity-common"
repository = "https://github.com/paritytech/parity-common"
description = "Macros to define custom fixed-size hash types"
documentation = "https://docs.rs/fixed-hash/"
readme = "README.md"
edition = "2021"
rust-version = "1.60"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
features = ["quickcheck", "api-dummy"]

[dependencies]
quickcheck = { version = "1", optional = true }
rand = { version = "0.8.0", optional = true, default-features = false }
rustc-hex = { version = "2.0.1", optional = true, default-features = false }
static_assertions = "1.0.0"
arbitrary = { version = "1.0", optional = true }
quickcheck = { workspace = true, optional = true }
rand = { workspace = true, optional = true }
rustc-hex = { workspace = true, optional = true }
static_assertions = { workspace = true }
arbitrary = { workspace = true, optional = true }

[dev-dependencies]
rand_xorshift = "0.3.0"
criterion = "0.5.1"
rand = { version = "0.8.0", default-features = false, features = ["std_rng"] }
rand_xorshift = { workspace = true }
criterion = { workspace = true }
rand = { workspace = true, default-features = false, features = ["std_rng"] }

[features]
default = ["std", "rand", "rustc-hex"]
Expand Down
17 changes: 9 additions & 8 deletions keccak-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
name = "keccak-hash"
version = "0.11.0"
description = "`keccak-hash` is a set of utility functions to facilitate working with Keccak hashes (256/512 bits long)."
authors = ["Parity Technologies <[email protected]>"]
repository = "https://github.com/paritytech/parity-common"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
tiny-keccak = { version = "2.0", features = ["keccak"] }
primitive-types = { path = "../primitive-types", version = "0.13", default-features = false }
tiny-keccak = { workspace = true, features = ["keccak"] }
primitive-types = { workspace = true }

[dev-dependencies]
tempfile = "3.1.0"
criterion = "0.5.1"
tempfile = { workspace = true }
criterion = { workspace = true }

[features]
default = ["std"]
Expand Down
17 changes: 9 additions & 8 deletions kvdb-memorydb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[package]
name = "kvdb-memorydb"
version = "0.13.0"
authors = ["Parity Technologies <[email protected]>"]
repository = "https://github.com/paritytech/parity-common"
description = "A key-value in-memory database that implements the `KeyValueDB` trait"
license = "MIT OR Apache-2.0"
edition = "2021"
description = "A key-value in-memory database that implements the `KeyValueDB` trait"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
parking_lot = "0.12.0"
kvdb = { version = "0.13", path = "../kvdb" }
parking_lot = { workspace = true }
kvdb = { workspace = true }

[dev-dependencies]
kvdb-shared-tests = { path = "../kvdb-shared-tests", version = "0.11" }
kvdb-shared-tests = { workspace = true }

[features]
default = []
51 changes: 24 additions & 27 deletions kvdb-rocksdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
[package]
name = "kvdb-rocksdb"
version = "0.19.0"
authors = ["Parity Technologies <[email protected]>"]
repository = "https://github.com/paritytech/parity-common"
description = "kvdb implementation backed by RocksDB"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[[bench]]
name = "bench_read_perf"
harness = false

[dependencies]
smallvec = "1.0.0"
kvdb = { path = "../kvdb", version = "0.13" }
num_cpus = "1.10.1"
parking_lot = "0.12.0"
regex = "1.3.1"
smallvec = { workspace = true }
kvdb = { workspace = true }
num_cpus = { workspace = true }
parking_lot = { workspace = true }
regex = { workspace = true }

# OpenBSD and MSVC are unteested and shouldn't enable jemalloc:
# https://github.com/tikv/jemallocator/blob/52de4257fab3e770f73d5174c12a095b49572fba/jemalloc-sys/build.rs#L26-L27
[target.'cfg(any(target_os = "openbsd", target_env = "msvc"))'.dependencies.rocksdb]
default-features = false
features = ["snappy"]
version = "0.22.0"
[target.'cfg(any(target_os = "openbsd", target_env = "msvc"))'.dependencies]
rocksdb = { workspace = true, features = ["snappy"] }

[target.'cfg(not(any(target_os = "openbsd", target_env = "msvc")))'.dependencies.rocksdb]
default-features = false
features = ["snappy", "jemalloc"]
version = "0.22.0"
[target.'cfg(not(any(target_os = "openbsd", target_env = "msvc")))'.dependencies]
rocksdb = { workspace = true, features = ["snappy", "jemalloc"] }

[dev-dependencies]
alloc_counter = "0.0.4"
criterion = "0.5"
ethereum-types = { path = "../ethereum-types", features = ["rand"] }
kvdb-shared-tests = { path = "../kvdb-shared-tests", version = "0.11" }
rand = "0.8.0"
tempfile = "3.1.0"
keccak-hash = { path = "../keccak-hash" }
sysinfo = "0.30.13"
ctrlc = "3.1.4"
chrono = "0.4"
alloc_counter = { workspace = true }
criterion = { workspace = true }
ethereum-types = { workspace = true, features = ["rand"] }
kvdb-shared-tests = { workspace = true }
rand = { workspace = true, default-features = true }
tempfile = { workspace = true }
keccak-hash = { workspace = true }
sysinfo = { workspace = true }
ctrlc = { workspace = true }
chrono = { workspace = true }
12 changes: 7 additions & 5 deletions kvdb-shared-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[package]
name = "kvdb-shared-tests"
version = "0.11.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
rust-version = "1.56.1"
description = "Shared tests for kvdb functionality, to be executed against actual implementations"
license = "MIT OR Apache-2.0"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
kvdb = { path = "../kvdb", version = "0.13" }
kvdb = { workspace = true }
11 changes: 6 additions & 5 deletions kvdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "kvdb"
version = "0.13.0"
authors = ["Parity Technologies <[email protected]>"]
repository = "https://github.com/paritytech/parity-common"
description = "Generic key-value trait"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.56.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
smallvec = "1.0.0"
smallvec = { workspace = true }
Loading
Loading