rust-websocket-lite
rust-websocket-lite copied to clipboard
Clarify async use of websocket-lite
Hi,
The README on this repo says "You can use this crate in both asynchronous (futures-based) and synchronous code.". I suppose that's technically true, but it doesn't really hint that you'll be pulling in all of tokio.
"pulling in all of tokio" -> in the synchronous case? That's true, would an opt-out tokio
feature be of use?
Note that the codec is still defined in terms of the tokio_util crate, but with only the codec
feature required, this dependency is a lot smaller.
I'm writing an async program, so I can't really use anything here higher up the chain than websocket-codec
without pulling in tokio. I think the tokio
feature would probably be good for people who are writing synchronous programs, however. It's quite large.