From cdbae2c6b3de8d22a20cb6ce071f9c1aa5d6e967 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 29 Mar 2023 09:02:27 +0200 Subject: [PATCH 1/2] fix(libp2p): Export perf protocol As we do with all other protocols, make sure to expose `libp2p-perf` as well. See also discussion https://github.com/libp2p/rust-libp2p/pull/3508#discussion_r1125546920 --- libp2p/CHANGELOG.md | 4 ++++ libp2p/src/lib.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index adab7b52e13..2b345b821f0 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -11,9 +11,13 @@ - Introduce `libp2p::allow_block_list` module and deprecate `libp2p::Swarm::ban_peer_id`. See [PR 3590]. +- Introduce `libp2p::perf` module. + See [PR XXX]. + [PR 3386]: https://github.com/libp2p/rust-libp2p/pull/3386 [PR 3580]: https://github.com/libp2p/rust-libp2p/pull/3580 [PR 3590]: https://github.com/libp2p/rust-libp2p/pull/3590 +[PR XXX]: https://github.com/libp2p/rust-libp2p/pull/XXX # 0.51.1 diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index f453b5c28fd..84cfe5cf612 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -88,6 +88,9 @@ pub use libp2p_mplex as mplex; #[cfg(feature = "noise")] #[doc(inline)] pub use libp2p_noise as noise; +#[cfg(feature = "perf")] +#[doc(inline)] +pub use libp2p_perf as perf; #[cfg(feature = "ping")] #[doc(inline)] pub use libp2p_ping as ping; From 730269f42a0f5a0daab029e38dcdf4b85b0965ae Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 29 Mar 2023 09:18:39 +0200 Subject: [PATCH 2/2] Exclude on wasm --- libp2p/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index 84cfe5cf612..93519ead42f 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -89,6 +89,8 @@ pub use libp2p_mplex as mplex; #[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")]