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

Cargo.toml: Remove deprecated executor-specific features #3001

Merged
merged 16 commits into from
Oct 20, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -43,6 +43,13 @@

# `libp2p` facade crate

# 0.50.0 - [unreleased]

- Remove deprecated features: `tcp-tokio`, `mdns-tokio`, `dns-tokio`, `tcp-async-io`, `mdns-async-io`, `dns-async-std`.
See [PR 3001].

[PR 3001]: https://github.com/libp2p/rust-libp2p/pull/3001

# 0.49.0

- Remove default features. You need to enable required features explicitly now. As a quick workaround, you may want to use the
Expand Down
14 changes: 1 addition & 13 deletions Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "libp2p"
edition = "2021"
rust-version = "1.60.0"
description = "Peer-to-peer networking library"
version = "0.49.0"
version = "0.50.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -17,16 +17,12 @@ full = [
"dcutr",
"deflate",
"dns",
"dns-async-std",
"dns-tokio",
"ecdsa",
"floodsub",
"gossipsub",
"identify",
"kad",
"mdns",
"mdns-async-io",
"mdns-tokio",
"metrics",
"mplex",
"noise",
Expand All @@ -40,8 +36,6 @@ full = [
"secp256k1",
"serde",
"tcp",
"tcp-async-io",
"tcp-tokio",
"tokio",
"uds",
"wasm-bindgen",
Expand All @@ -54,16 +48,12 @@ autonat = ["dep:libp2p-autonat"]
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]
deflate = ["dep:libp2p-deflate"]
dns = ["dep:libp2p-dns"]
dns-async-std = ["dep:libp2p-dns", "libp2p-dns?/async-std"]
dns-tokio = ["dep:libp2p-dns", "libp2p-dns?/tokio"]
floodsub = ["dep:libp2p-floodsub"]
identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"]
kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"]
gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"]
metrics = ["dep:libp2p-metrics"]
mdns = ["dep:libp2p-mdns"]
mdns-async-io = ["dep:libp2p-mdns", "libp2p-mdns?/async-io"]
mdns-tokio = ["dep:libp2p-mdns", "libp2p-mdns?/tokio"]
mplex = ["dep:libp2p-mplex"]
noise = ["dep:libp2p-noise"]
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"]
Expand All @@ -73,8 +63,6 @@ relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"]
request-response = ["dep:libp2p-request-response"]
rendezvous = ["dep:libp2p-rendezvous"]
tcp = ["dep:libp2p-tcp"]
tcp-async-io = ["dep:libp2p-tcp", "libp2p-tcp?/async-io"]
tcp-tokio = ["dep:libp2p-tcp", "libp2p-tcp?/tokio"]
uds = ["dep:libp2p-uds"]
wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js"]
wasm-ext = ["dep:libp2p-wasm-ext"]
Expand Down
71 changes: 7 additions & 64 deletions src/lib.rs
Expand Up @@ -54,31 +54,11 @@ pub use libp2p_dcutr as dcutr;
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[doc(inline)]
pub use libp2p_deflate as deflate;
#[deprecated(
since = "0.49.0",
note = "The `dns-tokio` and `dns-async-std` features are deprecated. Use the new `dns` feature together with the `tokio` or `async-std` features."
)]
#[cfg(all(
any(feature = "dns-tokio", feature = "dns-async-std"),
not(feature = "dns")
))]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "dns-tokio", feature = "dns-async-std")))
)]
pub mod dns {
#[doc(inline)]
pub use libp2p_dns::*;
}

#[cfg(feature = "dns")]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(docsrs, doc(cfg(feature = "dns")))]
pub mod dns {
#[doc(inline)]
pub use libp2p_dns::*;
}
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[doc(inline)]
pub use libp2p_dns as dns;
#[cfg(feature = "floodsub")]
#[cfg_attr(docsrs, doc(cfg(feature = "floodsub")))]
#[doc(inline)]
Expand All @@ -96,31 +76,11 @@ pub use libp2p_identify as identify;
#[cfg_attr(docsrs, doc(cfg(feature = "kad")))]
#[doc(inline)]
pub use libp2p_kad as kad;
#[deprecated(
since = "0.49.0",
note = "The `mdns-tokio` and `mdns-async-io` features are deprecated. Use the new `mdns` feature together with the `tokio` or `async-std` features."
)]
#[cfg(all(
any(feature = "mdns-async-io", feature = "mdns-tokio"),
not(feature = "mdns")
))]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "mdns-tokio", feature = "mdns-async-io")))
)]
pub mod mdns {
#[doc(inline)]
pub use libp2p_mdns::*;
}

#[cfg(feature = "mdns")]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(docsrs, doc(cfg(feature = "mdns")))]
pub mod mdns {
#[doc(inline)]
pub use libp2p_mdns::*;
}
#[doc(inline)]
pub use libp2p_mdns as mdns;
#[cfg(feature = "metrics")]
#[cfg_attr(docsrs, doc(cfg(feature = "metrics")))]
#[doc(inline)]
Expand Down Expand Up @@ -159,28 +119,11 @@ pub use libp2p_rendezvous as rendezvous;
pub use libp2p_request_response as request_response;
#[doc(inline)]
pub use libp2p_swarm as swarm;
#[deprecated(
since = "0.49.0",
note = "The `tcp-tokio` and `tcp-async-io` features are deprecated. Use the new `tcp` feature together with the `tokio` or `async-std` features."
)]
#[cfg(all(
any(feature = "tcp-tokio", feature = "tcp-async-io"),
not(feature = "tcp")
))]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "tcp-tokio", feature = "tcp-async-io"))))]
pub mod tcp {
#[doc(inline)]
pub use libp2p_tcp::*;
}

#[cfg(feature = "tcp")]
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
#[cfg_attr(docsrs, doc(cfg(feature = "tcp")))]
pub mod tcp {
#[doc(inline)]
pub use libp2p_tcp::*;
}
#[doc(inline)]
pub use libp2p_tcp as tcp;
#[cfg(feature = "uds")]
#[cfg_attr(docsrs, doc(cfg(feature = "uds")))]
#[doc(inline)]
Expand Down