async-rs / async-tls

A TLS implementation over AsyncRead and AsyncWrite
https://async.rs
Apache License 2.0
167 stars 47 forks source link

Add cargo features "client" and "server" #23

Closed mbrubeck closed 4 years ago

mbrubeck commented 4 years ago

Since many consumers of this library do not need both client and server features, this allows them to shrink their dependencies somewhat.

In particular, server applications would no longer need to build the unused webpki and webpki-roots crate.

I would also suggest making these features disabled by default in a future version, to increase the likeliness that consumers will choose the features they actually need. (This would be a breaking change.)

mbrubeck commented 4 years ago

test_0rtt is failing on Travis. I can reproduce this failure locally both on this branch and on master, so I don't think it's related to my changes.

skade commented 4 years ago

Seems unrelated. I'm going to check that locally.

mbrubeck commented 4 years ago

In particular, server applications would no longer need to build the unused webpki and webpki-roots crates.

This was incorrect. Because rustls depends on webpki, server applications would still need to build that crate, though they would no longer need to build webpki-roots.

skade commented 4 years ago

Added documentation to the README and merged. Thanks @mbrubeck !