8000 fix: use minimal tokio features in `make` and `reconnect` features by Icemic · Pull Request #828 · tower-rs/tower · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: use minimal tokio features in make and reconnect features #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2025

Conversation

Icemic
Copy link
Contributor
@Icemic Icemic commented Jun 12, 2025

make or reconnect both features rely only on the basic tokio (tokio::io) and do not require the io-std feature, which instead leads to compilation errors on wasm32 target.

This PR changes it to the mininal tokio/sync to just enable tokio, improving compatibility with the wasm32 target.

@jplatte
Copy link
Member
jplatte commented Jun 14, 2025

You only partially implemented my suggestions. Here is what I meant:

--- a/tower/Cargo.toml
+++ b/tower/Cargo.toml
@@ -50,7 +50,7 @@ load = ["tokio/time", "tracing", "pin-project-lite"]
 load-shed = ["pin-project-lite"]
 make = ["pin-project-lite", "tokio"]
 ready-cache = ["futures-core", "futures-util", "indexmap", "tokio/sync", "tracing", "pin-project-lite"]
-reconnect = ["make", "tokio", "tracing"]
+reconnect = ["make", "tracing"]
 retry = ["tokio/time", "util"]
 spawn-ready = ["futures-util", "tokio/sync", "tokio/rt", "util", "tracing"]
 steer = []
@@ -66,7 +66,7 @@ futures-util = { workspace = true, features = ["alloc"], optional = true }
 hdrhistogram = { workspace = true, optional = true }
 indexmap = { workspace = true, optional = true }
 slab = { workspace = true, optional = true }
-tokio = { workspace = true, features = ["sync"], optional = true }
+tokio = { workspace = true, optional = true }
 tokio-stream = { workspace = true, optional = true }
 tokio-util = { workspace = true, optional = true }
 tracing = { workspace = true, features = ["std"], optional = true }

@Icemic
Copy link
Contributor Author
Icemic commented Jun 15, 2025

Done but I'm not sure if it is ok to remove sync from default enabled features of tokio for all cases. CI works fine however.

@jplatte
Copy link
Member
jplatte commented Jun 27, 2025

Thanks! I just realized this isn't merged yet. Not sure what happened there. GitHub is telling me there's merge conflicts and I can't resolve them myself because I'm not allowed to push to your branch. Mind rebasing or merging our main back into your branch?

@Icemic
Copy link
Contributor Author
Icemic commented Jun 30, 2025

Thanks! I just realized this isn't merged yet. Not sure what happened there. GitHub is telling me there's merge conflicts and I can't resolve them myself because I'm not allowed to push to your branch. Mind rebasing or merging our main back into your branch?

Sure!

@jplatte jplatte enabled auto-merge (squash) June 30, 2025 05:34
@jplatte jplatte disabled auto-merge June 30, 2025 05:34
@jplatte jplatte enabled auto-merge (squash) June 30, 2025 05:35
@jplatte jplatte merged commit 9754acb into tower-rs:master Jun 30, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0