Skip to content
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

Extract core features to independent sub-crates #180

Open
ubnt-intrepid opened this issue Jul 22, 2018 · 3 comments
Open

Extract core features to independent sub-crates #180

ubnt-intrepid opened this issue Jul 22, 2018 · 3 comments

Comments

@ubnt-intrepid
Copy link

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
Copy link
Member

vi commented Jul 22, 2018

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
Copy link
Author

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.
    • includes IntoWs

@illegalprime
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants