rust-websocket-lite icon indicating copy to clipboard operation
rust-websocket-lite copied to clipboard

Client refactor

Open Gelbpunkt opened this issue 3 years ago • 1 comments

Hi Tim,

I've done the following things:

  • lint the whole project against clippy's pedantic level and fix the issues (a couple #[must_use], missing error sections in docs, possible truncations or redundant else blocks)
  • ~~added a rustfmt config option that seems to match your import granularity~~ nightly only
  • removed the rust toolchain files (LMK if this needs to be readded)
  • disabling all TLS is now possible (fixes #220)
  • added support for Rustls as a pure rust TLS backend
  • removed support for OpenSSL because it is the backend for native-tls on Unix platforms anyways
  • reworked TLS to use a Connector struct that can be reused via ClientBuilder::set_connector to save memory when creating multiple clients
  • added a small abstraction around WebSocket close codes
  • replaced futures with futures-util where possible
  • disabled default features on big dependencies where possible
  • and probably more, please make sure to check the changes

After reading your reply in the email, I've also readded the sync support that I initially removed.

I'm happy to address any comments or nits you find with the changes!

Since CI doesn't run on forks, I hope I didn't break too much :)

If you decide to merge this, please squash the changes to not make it 25 individual commits.

Signed-off-by: Jens Reidel [email protected]

Gelbpunkt avatar Aug 10 '21 12:08 Gelbpunkt

There are a couple of things here that I have a weird feeling about, I'll comment on the specific parts

Gelbpunkt avatar Aug 10 '21 17:08 Gelbpunkt

Is it possible for this to land? rustls would be pretty cool / avoid openssl-sys cross compiling weirdness.

brandonros avatar Dec 04 '22 20:12 brandonros

Superseded by #327.

1tgr avatar Dec 28 '22 18:12 1tgr