Open ubnt-intrepid opened 6 years ago
It's a good idea.
What architecture (and which item goes to which crate) do you suggest? Shall it be just two crates: IO-agnostic (without references to tokio or std::net
) and high-level? Or something more elaborate?
The next major-ish version would probably be just updating websocket-rs's dependencies to recent versions.
Shall it be just two crates: IO-agnostic (without references to tokio or std::net) and high-level? Or something more elaborate?
It seems good to extract the hyper
-independent components as a new crate:
websocket-core
- primitives for the opening handshake parts and dataframes.websocket
- the implementation of client/server using the above crates.
IntoWs
I agree, it sounds really good. Maybe removing the hyper
dependency is a good motivator to split this up into many crates, its already rewriting a lot of it anyway.
Currently,
rust-websocket
provides the all features from a single crate, but in the case of using only certain features (like encoding/decoding data frames) most of these features are unneeded.It is desirable to extract some components which do not depend on the higher level implementations (such as client and server) as independent crates.