mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
protocols/mdns: Allow users to choose between async-io and tokio runtime (#2748)
Allow users to choose between async-io and tokio runtime in the mdns protocol implementation. `async-io` is a default feature, with an additional `tokio` feature. Fix high CPU usage with Tokio library.
This commit is contained in:
committed by
GitHub
parent
36a2773861
commit
89f898c69f
@ -79,8 +79,11 @@ pub use libp2p_identify as identify;
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "kad")))]
|
||||
#[doc(inline)]
|
||||
pub use libp2p_kad as kad;
|
||||
#[cfg(feature = "mdns")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "mdns")))]
|
||||
#[cfg(any(feature = "mdns-async-io", feature = "mdns-tokio"))]
|
||||
#[cfg_attr(
|
||||
docsrs,
|
||||
doc(cfg(any(feature = "mdns-tokio", feature = "mdns-async-io")))
|
||||
)]
|
||||
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
|
||||
#[doc(inline)]
|
||||
pub use libp2p_mdns as mdns;
|
||||
|
Reference in New Issue
Block a user