Skip to content

Commit

Permalink
fix(libp2p): don't re-export libp2p-perf
Browse files Browse the repository at this point in the history
This commit removes the `libp2p-perf` protocol from `libp2p` crate. To use `libp2p-perf` one needs to import it directly. Rational beeing that `libp2p-perf`'s API is not yet stable enough and will most likely require breaking changes in the near future.

Pull-Request: #3990.
  • Loading branch information
mxinden authored May 26, 2023
1 parent bbba8b3 commit d4c4078
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

6 changes: 5 additions & 1 deletion libp2p/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@
This newtype enforces additional variants like a leading forward-slash.
We encourage users to use `StreamProtocol` when implementing `UpgradeInfo`.
See [PR 3746].

- Rename `NetworkBehaviour::OutEvent` to `NetworkBehaviour::ToSwarm`, `ConnectionHandler::InEvent` to `ConnectionHandler::FromBehaviour`, `ConnectionHandler::OutEvent` to `ConnectionHandler::ToBehaviour`. See [PR 3848].

- Remove deprecated `mplex` module.
You can still depend on `libp2p-mplex` directly but we strongly encourage to migrate to `yamux`.
This also removes `mplex` from the `development_transport` and `tokio_development_transport` functions.
See [PR 3920].

- Remove `libp2p-perf` protocol. To use `libp2p-perf` one needs to import it directly.
See [PR 3990].

[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

## 0.51.3

Expand Down
3 changes: 0 additions & 3 deletions libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ full = [
"mdns",
"metrics",
"noise",
"perf",
"ping",
"plaintext",
"pnet",
Expand Down Expand Up @@ -65,7 +64,6 @@ macros = ["libp2p-swarm/macros"]
mdns = ["dep:libp2p-mdns"]
metrics = ["dep:libp2p-metrics"]
noise = ["dep:libp2p-noise"]
perf = ["dep:libp2p-perf"]
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"]
plaintext = ["dep:libp2p-plaintext"]
pnet = ["dep:libp2p-pnet"]
Expand Down Expand Up @@ -123,7 +121,6 @@ pin-project = "1.0.0"
libp2p-deflate = { workspace = true, optional = true }
libp2p-dns = { workspace = true, optional = true }
libp2p-mdns = { workspace = true, optional = true }
libp2p-perf = { workspace = true, optional = true }
libp2p-quic = { workspace = true, optional = true }
libp2p-tcp = { workspace = true, optional = true }
libp2p-tls = { workspace = true, optional = true }
Expand Down
5 changes: 0 additions & 5 deletions libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ pub use libp2p_metrics as metrics;
#[cfg(feature = "noise")]
#[doc(inline)]
pub use libp2p_noise as noise;
#[cfg(feature = "perf")]
#[cfg(not(target_arch = "wasm32"))]
#[cfg_attr(docsrs, doc(cfg(feature = "perf")))]
#[doc(inline)]
pub use libp2p_perf as perf;
#[cfg(feature = "ping")]
#[doc(inline)]
pub use libp2p_ping as ping;
Expand Down

0 comments on commit d4c4078

Please sign in to comment.