Skip to content

Commit f47e38e

Browse files
authored
chore(tcp): remove async_std support
Pull-Request: #5955.
1 parent c476bce commit f47e38e

File tree

15 files changed

+67
-378
lines changed

15 files changed

+67
-378
lines changed

Cargo.lock

Lines changed: 1 addition & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ libp2p-stream = { version = "0.3.0-alpha.1", path = "protocols/stream" }
105105
libp2p-swarm = { version = "0.47.0", path = "swarm" }
106106
libp2p-swarm-derive = { version = "=0.35.1", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required.
107107
libp2p-swarm-test = { version = "0.6.0", path = "swarm-test" }
108-
libp2p-tcp = { version = "0.43.0", path = "transports/tcp" }
108+
libp2p-tcp = { version = "0.44.0", path = "transports/tcp" }
109109
libp2p-tls = { version = "0.6.2", path = "transports/tls" }
110110
libp2p-uds = { version = "0.42.0", path = "transports/uds" }
111111
libp2p-upnp = { version = "0.4.1", path = "protocols/upnp" }

libp2p/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
- Make the `*-websys` variants (`libp2p-webrtc-websys`, `libp2p-websocket-websys`, `libp2p-webtransport-websys`) only available on wasm32 target architecture.
1414
See [PR 5891](https://github.com/libp2p/rust-libp2p/pull/5891).
1515

16+
- Remove TCP from the `async-std` swarm builder, as `async-std` support was removed from `libp2p-tcp` transport.
17+
See [PR 5955](https://github.com/libp2p/rust-libp2p/pull/5955)
18+
1619
- Remove QUIC from the `async-std` swarm builder, as `async-std` support was removed from `libp2p-quic` transport.
1720
See [PR 5954](https://github.com/libp2p/rust-libp2p/pull/5954)
1821

libp2p/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ full = [
5353
"upnp",
5454
]
5555

56-
async-std = ["libp2p-swarm/async-std", "libp2p-tcp?/async-io"]
56+
async-std = ["libp2p-swarm/async-std"]
5757
autonat = ["dep:libp2p-autonat"]
5858
cbor = ["libp2p-request-response?/cbor"]
5959
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]

libp2p/src/builder.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -102,28 +102,6 @@ mod tests {
102102
.build();
103103
}
104104

105-
#[test]
106-
#[cfg(all(
107-
feature = "async-std",
108-
feature = "tcp",
109-
feature = "tls",
110-
feature = "noise",
111-
feature = "yamux",
112-
))]
113-
fn async_std_tcp() {
114-
let _ = SwarmBuilder::with_new_identity()
115-
.with_async_std()
116-
.with_tcp(
117-
Default::default(),
118-
libp2p_tls::Config::new,
119-
libp2p_yamux::Config::default,
120-
)
121-
.unwrap()
122-
.with_behaviour(|_| libp2p_swarm::dummy::Behaviour)
123-
.unwrap()
124-
.build();
125-
}
126-
127105
#[test]
128106
#[cfg(all(feature = "tokio", feature = "quic"))]
129107
fn quic() {

libp2p/src/builder/phase/tcp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ macro_rules! impl_tcp_builder {
9797
};
9898
}
9999

100-
impl_tcp_builder!("async-std", super::provider::AsyncStd, async_io);
101100
impl_tcp_builder!("tokio", super::provider::Tokio, tokio);
102101

103102
impl<Provider> SwarmBuilder<Provider, TcpPhase> {

muxers/mplex/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ futures = { workspace = true }
3030
libp2p-identity = { workspace = true, features = ["rand"] }
3131
libp2p-muxer-test-harness = { path = "../test-harness" }
3232
libp2p-plaintext = { workspace = true }
33-
libp2p-tcp = { workspace = true, features = ["async-io"] }
33+
libp2p-tcp = { workspace = true, features = ["tokio"] }
3434
quickcheck = { workspace = true }
3535
tracing-subscriber = { workspace = true, features = ["env-filter"] }
3636

muxers/mplex/benches/split_send_size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn tcp_transport(split_send_size: usize) -> BenchTransport {
186186
let mut mplex = mplex::Config::default();
187187
mplex.set_split_send_size(split_send_size);
188188

189-
libp2p_tcp::async_io::Transport::new(libp2p_tcp::Config::default().nodelay(true))
189+
libp2p_tcp::tokio::Transport::new(libp2p_tcp::Config::default().nodelay(true))
190190
.upgrade(upgrade::Version::V1)
191191
.authenticate(plaintext::Config::new(
192192
&identity::Keypair::generate_ed25519(),

protocols/dcutr/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ libp2p-plaintext = { workspace = true }
3232
libp2p-relay = { workspace = true }
3333
libp2p-swarm = { workspace = true, features = ["macros"] }
3434
libp2p-swarm-test = { path = "../../swarm-test" }
35-
libp2p-tcp = { workspace = true, features = ["async-io"] }
35+
libp2p-tcp = { workspace = true, features = ["tokio"] }
3636
libp2p-yamux = { workspace = true }
3737
tracing-subscriber = { workspace = true, features = ["env-filter"] }
3838
tokio = { workspace = true, features = ["rt", "macros"] }

protocols/dcutr/tests/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn build_client() -> Swarm<Client> {
135135

136136
let transport = relay_transport
137137
.or_transport(MemoryTransport::default())
138-
.or_transport(libp2p_tcp::async_io::Transport::default())
138+
.or_transport(libp2p_tcp::tokio::Transport::default())
139139
.upgrade(Version::V1)
140140
.authenticate(plaintext::Config::new(&local_key))
141141
.multiplex(libp2p_yamux::Config::default())

0 commit comments

Comments
 (0)