Cargo features: support both default TLS and Rust TLS for Reqwest through feature forwarding#115
Open
E-gy wants to merge 1 commit intofMeow:mainfrom
Open
Cargo features: support both default TLS and Rust TLS for Reqwest through feature forwarding#115E-gy wants to merge 1 commit intofMeow:mainfrom
E-gy wants to merge 1 commit intofMeow:mainfrom
Conversation
Owner
|
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 But yes, we have to disable reqwest's default features in arangors. |
Owner
|
Maybe like this branch: feat/tls-choice. |
Author
|
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 Though suffice to add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this change,
arangorscan 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 addingarangorsas dependency with flags:Native (Default) TLS can be forced manually in a similar manner with
Of course, the TLS provider can be switched independently of blocking/async mode.
The way to handle feature gate forwarding was inspired by elasticsearch.