Skip to content

Is it a bad practice to depend on Tokio in a library? #5289

Discussion options

You must be logged in to vote

I believe that there are adapters to make other async implementations implement tokio's traits. As far as getting locked on to tokio, currently there isn't really a good cross-runtime set of abstractions for things like, say, connecting a TcpStream, so this is kinda an ecosystem issue.

I share your concerns about the ecosystem being as coupled to tokio as it is, unfortunately I'm not sure that this is going away anytime soon. That said, we are very much aware of how much use tokio has across the ecosystem and I don't think that tokio 2.0 is ever going to happen. Hopefully at some point we have better systems to abstract over multiple runtimes, but for now we do not.

To answer your questio…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hawkw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants