rust-websocket-lite
rust-websocket-lite copied to clipboard
Client refactor
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 viaClientBuilder::set_connector
to save memory when creating multiple clients - added a small abstraction around WebSocket close codes
- replaced
futures
withfutures-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]
There are a couple of things here that I have a weird feeling about, I'll comment on the specific parts
Is it possible for this to land? rustls
would be pretty cool / avoid openssl-sys
cross compiling weirdness.
Superseded by #327.