Skip to content

Commit

Permalink
feat(libp2p): remove quic and webrtc re-export
Browse files Browse the repository at this point in the history
These two re-exports are deprecated because they are both in alpha status. Users should depend on them directly.

Related: libp2p#3647.

Pull-Request: libp2p#4041.
  • Loading branch information
thomaseizinger authored Jun 6, 2023
1 parent 0db9937 commit 23d499b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions libp2p/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@
- Remove `libp2p-perf` protocol. To use `libp2p-perf` one needs to import it directly.
See [PR 3990].

- Remove `libp2p-quic` and `libp2p-webrtc` protocols.
These are in alpha status and should be depended on directly.
See [PR 4041].

[PR 3715]: https://github.com/libp2p/rust-libp2p/pull/3715
[PR 3746]: https://github.com/libp2p/rust-libp2p/pull/3746
[PR 3848]: https://github.com/libp2p/rust-libp2p/pull/3848
[PR 3920]: https://github.com/libp2p/rust-libp2p/pull/3920
[PR 3990]: https://github.com/libp2p/rust-libp2p/pull/3990
[PR 4041]: https://github.com/libp2p/rust-libp2p/pull/4041

## 0.51.3

Expand Down
10 changes: 2 additions & 8 deletions libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ full = [
"ping",
"plaintext",
"pnet",
"quic",
"relay",
"rendezvous",
"request-response",
Expand All @@ -44,12 +43,11 @@ full = [
"wasm-bindgen",
"wasm-ext",
"wasm-ext-websocket",
"webrtc",
"websocket",
"yamux",
]

async-std = ["libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std", "libp2p-quic?/async-std"]
async-std = ["libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std"]
autonat = ["dep:libp2p-autonat"]
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]
deflate = ["dep:libp2p-deflate"]
Expand All @@ -67,7 +65,6 @@ noise = ["dep:libp2p-noise"]
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"]
plaintext = ["dep:libp2p-plaintext"]
pnet = ["dep:libp2p-pnet"]
quic = ["dep:libp2p-quic"]
relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"]
rendezvous = ["dep:libp2p-rendezvous"]
request-response = ["dep:libp2p-request-response"]
Expand All @@ -76,12 +73,11 @@ secp256k1 = ["libp2p-identity/secp256k1"]
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"]
tcp = ["dep:libp2p-tcp"]
tls = ["dep:libp2p-tls"]
tokio = ["libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-webrtc?/tokio"]
tokio = ["libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio"]
uds = ["dep:libp2p-uds"]
wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen", "libp2p-gossipsub?/wasm-bindgen"]
wasm-ext = ["dep:libp2p-wasm-ext"]
wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"]
webrtc = ["dep:libp2p-webrtc", "libp2p-webrtc?/pem"]
websocket = ["dep:libp2p-websocket"]
yamux = ["dep:libp2p-yamux"]

Expand Down Expand Up @@ -121,11 +117,9 @@ pin-project = "1.0.0"
libp2p-deflate = { workspace = true, optional = true }
libp2p-dns = { workspace = true, optional = true }
libp2p-mdns = { workspace = true, optional = true }
libp2p-quic = { workspace = true, optional = true }
libp2p-tcp = { workspace = true, optional = true }
libp2p-tls = { workspace = true, optional = true }
libp2p-uds = { workspace = true, optional = true }
libp2p-webrtc = { workspace = true, optional = true }
libp2p-websocket = { workspace = true, optional = true }

[dev-dependencies]
Expand Down
17 changes: 0 additions & 17 deletions libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ pub use libp2p_plaintext as plaintext;
#[cfg(feature = "pnet")]
#[doc(inline)]
pub use libp2p_pnet as pnet;
#[cfg(feature = "quic")]
#[cfg(not(target_arch = "wasm32"))]
#[deprecated(
note = "`quic` is only in alpha status. Please depend on `libp2p-quic` directly and don't ues the `quic` feature of `libp2p`."
)]
pub mod quic {
pub use libp2p_quic::*;
}
#[cfg(feature = "relay")]
#[doc(inline)]
pub use libp2p_relay as relay;
Expand Down Expand Up @@ -131,15 +123,6 @@ pub use libp2p_uds as uds;
#[cfg(feature = "wasm-ext")]
#[doc(inline)]
pub use libp2p_wasm_ext as wasm_ext;
#[cfg(feature = "webrtc")]
#[cfg_attr(docsrs, doc(cfg(feature = "webrtc")))]
#[cfg(not(target_arch = "wasm32"))]
#[deprecated(
note = "`webrtc` is only in alpha status. Please depend on `libp2p-webrtc` directly and don't ues the `webrtc` feature of `libp2p`."
)]
pub mod webrtc {
pub use libp2p_webrtc::*;
}
#[cfg(feature = "websocket")]
#[cfg(not(target_arch = "wasm32"))]
#[doc(inline)]
Expand Down

0 comments on commit 23d499b

Please sign in to comment.