websockets-rs / rust-websocket

A WebSocket (RFC6455) library written in Rust
http://websockets-rs.github.io/rust-websocket/
MIT License
1.55k stars 223 forks source link

Extract core features to independent sub-crates #180

Open ubnt-intrepid opened 6 years ago

ubnt-intrepid commented 6 years ago

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.

vi commented 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.

ubnt-intrepid commented 6 years ago

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:

illegalprime commented 6 years ago

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.