Files
rust-libp2p/core/Cargo.toml
Thomas Eizinger 996b5c8bd0 chore: leverage cargo's workspace inheritance
Previously, we would specify the version and path of our workspace dependencies in each of our crates. This is error prone as https://github.com/libp2p/rust-libp2p/pull/3658#discussion_r1153278072 for example shows. Problems like these happened in the past too.

There is no need for us to ever depend on a earlier version than the most current one in our crates. It thus makes sense that we manage this version in a single place.

Cargo supports a feature called "workspace inheritance" which allows us to share a dependency declaration across a workspace and inherit it with `{ workspace = true }`.

We do this for all our workspace dependencies and for the MSRV.

Resolves #3787.

Pull-Request: #3715.
2023-05-02 09:14:14 +00:00

55 lines
1.7 KiB
TOML

[package]
name = "libp2p-core"
edition = "2021"
rust-version = { workspace = true }
description = "Core traits and structs of libp2p"
version = "0.40.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]
[dependencies]
either = "1.5"
fnv = "1.0"
futures = { version = "0.3.28", features = ["executor", "thread-pool"] }
futures-timer = "3"
instant = "0.1.11"
libp2p-identity = { workspace = true, features = ["peerid", "ed25519"] }
log = "0.4"
multiaddr = { version = "0.17.1" }
multihash = { version = "0.17.0", default-features = false, features = ["std"] }
multistream-select = { workspace = true }
once_cell = "1.17.1"
parking_lot = "0.12.0"
pin-project = "1.0.0"
quick-protobuf = "0.8"
rand = "0.8"
rw-stream-sink = { workspace = true }
serde = { version = "1", optional = true, features = ["derive"] }
smallvec = "1.6.1"
thiserror = "1.0"
unsigned-varint = "0.7"
void = "1"
[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
libp2p-mplex = { workspace = true }
libp2p-noise = { workspace = true }
multihash = { version = "0.17.0", default-features = false, features = ["arb"] }
quickcheck = { workspace = true }
[features]
secp256k1 = [ "libp2p-identity/secp256k1" ]
ecdsa = [ "libp2p-identity/ecdsa" ]
rsa = [ "libp2p-identity/rsa" ]
serde = ["multihash/serde-codec", "dep:serde", "libp2p-identity/serde"]
# Passing arguments to the docsrs builder in order to properly document cfg's.
# More information: https://docs.rs/about/builds#cross-compiling
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]