Cargo features: support both default TLS and Rust TLS for Reqwest through feature forwarding
With this change, arangors can support Rust TLS out of the box. Default configuration is effectively unchanged, using default TLS.
To support Rust TLS as TLS provider for reqwest, now all that has to be done is adding arangors as dependency with flags:
arangors = { ..., default-features = false, features = ["rocksdb", "reqwest_async", "reqwest_rustls-tls"]}
Native (Default) TLS can be forced manually in a similar manner with
arangors = { ..., default-features = false, features = ["rocksdb", "reqwest_async", "reqwest_default-tls"]}
Of course, the TLS provider can be switched independently of blocking/async mode.
The way to handle feature gate forwarding was inspired by elasticsearch.
Thanks for your PR!!
But I think that using feature gate to pass down feature is not necessary. Rust's feature is addtive, which means that we can just declare reqwest dependency in top level crate and enable whatever features we want without touching arangors.
But yes, we have to disable reqwest's default features in arangors.
Maybe like this branch: feat/tls-choice.
Indeed! Though the literal way it is on feat/tls-choice right now, it won't work "out-of-the-box" - i.e. the end users have to add top level request version="*" with either features = ["default-tls"] or features = ["rustls-tls"].
Though suffice to add reqwest/default-tls to default features (then once again requiring default-features = false for rustls).