-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Remove tokio I/O traits from dependencies #720
Comments
I think this is something we could do, though it would be a breaking change and highlighting why it's worth it, and also how we would track the differences with hyper, would be good to do. |
It would enable usage of
Maybe we can extract the |
Hm. It's already been possible to use hyper and h2 with different runtimes. I've seen hyper 0.14 work with curl, async-std, and Fuchsia. Using just the traits from Tokio doesn't make it use the runtime, or even enable all the runtime code. The reason why hyper made its own traits was to be able to update them independently for eventual io-uring upgrades. I don't really want to extract those traits to a separate crate, I don't mean for them to be used throughout the ecosystem. They're just how to hook into hyper. That said, I do still think this is something that could be done for h2, with other motivations brought up. |
I think the idea is to not bring in Tokio as a dependency at all while still being able to use |
Tokio is a great runtime and is a good default choice. However, for such a fundamental library as h2 forcing runtime is too intrusive. It would be great to get rid of tokio as a dependency completely, even though you can use any runtime on top of it |
Would it be accepted to replace the
tokio
I/O traits with more general I/O traits, like what happened inhyper
? If so, I can implement this.The text was updated successfully, but these errors were encountered: