diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 3b06d60..43f6777 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libp2p = { version = "0.35.0", default-features = false, features = ["dns", "noise", "plaintext", "tcp-async-io", "yamux"] } +libp2p = { version = "0.36.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux"] } futures_codec = "0.4" futures = "0.3.1" async-std = { version = "1.6.2", features = ["attributes"] } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 1a38300..4b7d195 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -3,6 +3,7 @@ mod handler; mod protocol; pub use behaviour::{Perf, PerfEvent}; +use futures::executor::block_on; use libp2p::{ core::{ @@ -139,7 +140,9 @@ pub fn build_transport( let transport = if in_memory { EitherTransport::Left(MemoryTransport {}) } else { - EitherTransport::Right(dns::DnsConfig::new(tcp::TcpConfig::new().nodelay(true))?) + EitherTransport::Right(block_on(dns::DnsConfig::system( + tcp::TcpConfig::new().nodelay(true), + ))?) }; Ok(transport