Skip to content

Commit

Permalink
chore: use workspace.dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Nov 27, 2024
1 parent 33deb9d commit e76e6c8
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 96 deletions.
79 changes: 60 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
[package]
name = "libipld"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "library for dealing with ipld"
repository = "https://github.com/ipld/libipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.release]
consolidate-commits = true
shared-version = true

[dependencies]
fnv = "1.0.7"
libipld-cbor = { version = "0.16.0", path = "dag-cbor", optional = true }
libipld-cbor-derive = { version = "0.16.0", path = "dag-cbor-derive", optional = true }
libipld-core = { version = "0.16.0", path = "core" }
libipld-json = { version = "0.16.0", path = "dag-json", optional = true }
libipld-macro = { version = "0.16.0", path = "macro" }
libipld-pb = { version = "0.16.0", path = "dag-pb", optional = true }
log = "0.4.14"
multihash = { version = "0.18.0", default-features = false, features = ["multihash-impl"] }
thiserror = "1.0.25"
libipld-cbor = { workspace = true, optional = true }
libipld-cbor-derive = { workspace = true, optional = true }
libipld-core = { workspace = true }
libipld-json = { workspace = true, optional = true }
libipld-macro = { workspace = true }
libipld-pb = { workspace = true, optional = true }

multihash = { workspace = true, features = ["multihash-impl"] }
thiserror = { workspace = true }

[dev-dependencies]
async-std = { version = "1.9.0", features = ["attributes"] }
criterion = "0.3.4"
proptest = "1.0.0"
model = "0.1.2"
ahash = { workspace = true }
criterion = { workspace = true }
multihash = { workspace = true, features = ["blake3"] }

[features]
default = ["dag-cbor", "dag-json", "dag-pb", "derive"]
Expand All @@ -48,6 +46,49 @@ members = [
"macro",
"dag-cbor-derive/examples/renamed-package",
]
resolver = "2"

[workspace.package]
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ipld/libipld"

[workspace.dependencies]
libipld = { path = "." }
libipld-cbor = { path = "dag-cbor" }
libipld-cbor-derive = { path = "dag-cbor-derive" }
libipld-core = { path = "core" }
libipld-json = { path = "dag-json" }
libipld-macro = { path = "macro" }
libipld-pb = { path = "dag-pb" }

# External dependencies
ahash = "0.8"
anyhow = { version = "1", default-features = false }
byteorder = "1"
bytes = "1"
cid = { version = "0.10", default-features = false, features = ["alloc"] }
core2 = { version = "0.4", default-features = false, features = ["alloc"] }
criterion = "0.5"
hex = "0.4"
multibase = { version = "0.9", default-features = false }
multihash = { version = "0.18", default-features = false, features = ["alloc"] }
proc-macro-crate = "1"
proc-macro2 = "1"
quick-protobuf = "0.8"
quickcheck = "1"
quote = "1"
serde = { version = "1", default-features = false, features = ["alloc"] }
serde_bytes = "0.11"
serde_cbor = "0.11"
serde_json = "1"
serde_test = "1"
syn = "1"
synstructure = "0.12"
thiserror = "2"
trybuild = "1"

[profile.release]
debug = true
Expand Down
39 changes: 19 additions & 20 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
[package]
name = "libipld-core"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Base traits and definitions used by ipld codecs."
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[features]
default = ["std"]
std = ["anyhow/std", "cid/std", "multibase/std", "multihash/std", "thiserror"]
serde-codec = ["cid/serde-codec", "serde"]
arb = ["quickcheck", "cid/arb"]
serde-codec = ["cid/serde-codec", "dep:serde"]
arb = ["dep:quickcheck", "cid/arb"]

[dependencies]
anyhow = { version = "1.0.40", default-features = false }
cid = { version = "0.10.0", default-features = false, features = ["alloc"] }
core2 = { version = "0.4", default-features = false, features = ["alloc"] }
multihash = { version = "0.18.0", default-features = false, features = ["alloc"] }

multibase = { version = "0.9.1", default-features = false, optional = true }
serde = { version = "1.0.132", default-features = false, features = ["alloc"], optional = true }
thiserror = {version = "1.0.25", optional = true }
quickcheck = { version = "1.0", optional = true }
anyhow = { workspace = true }
cid = { workspace = true }
core2 = { workspace = true }
multibase = { workspace = true }
multihash = { workspace = true }
quickcheck = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }

[dev-dependencies]
multihash = { version = "0.18.0", default-features = false, features = ["multihash-impl", "blake3"] }
serde_test = "1.0.132"
serde_bytes = "0.11.5"
serde_json = "1.0.79"
multihash = { workspace = true, features = ["multihash-impl", "blake3"] }
serde_bytes = { workspace = true }
serde_json = { workspace = true }
serde_test = { workspace = true }
24 changes: 12 additions & 12 deletions dag-cbor-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[package]
name = "libipld-cbor-derive"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ipld cbor codec proc macro"
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[lib]
proc-macro = true

[dependencies]
proc-macro-crate = "1.1.0"
proc-macro2 = "1.0.27"
quote = "1.0.9"
syn = "1.0.72"
synstructure = "0.12.4"
proc-macro-crate = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true }
synstructure = { workspace = true }

[dev-dependencies]
libipld = { path = ".." }
trybuild = "1.0.42"
libipld = { workspace = true }
trybuild = { workspace = true }
2 changes: 1 addition & 1 deletion dag-cbor-derive/examples/renamed-package/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ publish = false
release = false

[dependencies]
ipld = { path = "../../../", package = "libipld"}
ipld = { path = "../../../", package = "libipld" }
26 changes: 13 additions & 13 deletions dag-cbor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "libipld-cbor"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ipld cbor codec"
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
byteorder = "1.4.3"
libipld-core = { version = "0.16.0", path = "../core" }
thiserror = "1.0.25"
byteorder = { workspace = true }
libipld-core = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
hex = "0.4.3"
libipld-macro = { path = "../macro" }
multihash = "0.17.0"
quickcheck = "1.0.3"
serde_cbor = { version = "0.11.1", features = ["tags"] }
hex = { workspace = true }
libipld-macro = { workspace = true }
multihash = { workspace = true }
quickcheck = { workspace = true }
serde_cbor = { workspace = true, features = ["tags"] }
18 changes: 9 additions & 9 deletions dag-json/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "libipld-json"
version = "0.16.0"
authors = ["Irakli Gozalishvili <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ipld json codec"
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
libipld-core = { version = "0.16.0", path = "../core" }
multihash = "0.18.0"
serde_json = { version = "1.0.64", features = ["float_roundtrip"] }
serde = { version = "1.0.126", features = ["derive"] }
libipld-core = { workspace = true }
multihash = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["float_roundtrip"] }
24 changes: 11 additions & 13 deletions dag-pb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
[package]
name = "libipld-pb"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ipld protobuf codec"
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
libipld-core = { version = "0.16.0", path = "../core" }
thiserror = "1.0.25"
quick-protobuf = "0.8.1"
bytes = "1.3.0"
bytes = { workspace = true }
libipld-core = { workspace = true }
quick-protobuf = { workspace = true }

[dev-dependencies]
libipld-macro = { path = "../macro" }
libipld = { path = "../" }
multihash = "0.18.0"
hex = "0.4.3"
hex = { workspace = true }
libipld = { workspace = true }
multihash = { workspace = true }
14 changes: 7 additions & 7 deletions macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "libipld-macro"
version = "0.16.0"
authors = ["David Craven <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ipld macro"
repository = "https://github.com/ipfs-rust/rust-ipld"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
libipld-core = { version = "0.16.0", path = "../core" }
libipld-core = { workspace = true }

[dev-dependencies]
multihash = { version = "0.18.0", features = ["blake3"] }
multihash = { workspace = true, features = ["blake3"] }
4 changes: 2 additions & 2 deletions src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ mod tests {
use crate::ipld::Ipld;
use crate::multihash::Code;
use crate::store::DefaultParams;
use fnv::FnvHashSet;
use ahash::HashSet;

type IpldBlock = Block<DefaultParams>;

Expand All @@ -222,7 +222,7 @@ mod tests {
let payload2 = block.decode::<IpldCodec, _>().unwrap();
assert_eq!(payload, payload2);

let mut refs = FnvHashSet::default();
let mut refs = HashSet::default();
payload2.references(&mut refs);
assert_eq!(refs.len(), 3);
assert!(refs.contains(&b1.cid));
Expand Down

0 comments on commit e76e6c8

Please sign in to comment.