feat: add tls backend control through features to rust api client#443
Open
Alenar wants to merge 1 commit intoblockfrost:masterfrom
Open
feat: add tls backend control through features to rust api client#443Alenar wants to merge 1 commit intoblockfrost:masterfrom
Alenar wants to merge 1 commit intoblockfrost:masterfrom
Conversation
by upgrading the generator from `0.7.12` to `0.7.20` This also upgrade `reqwest` to `0.13+`.
|
@Alenar is attempting to deploy a commit to the Five Binaries IOG Team on Vercel. A member of the Team first needs to authorize it. |
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.
Content
This PR add tls backend control through features to the rust api client.
This was done by upgrading the generator from
0.7.12to0.7.20and regenerating the rust crate usingyarn generate-types:rust.Rational
At Mithril one of our current focus is switching all our binaries to static linking, for TLS we want to switch our backend from
native-tls-vendoredtorustlsto remove all paths that build openssl but ... thisblockfrost-openapicrate doesn't allow to control the features of itsreqwestdependency as it is declared like this:Meaning that it activate the default feature of reqwest which spread to our crates through the
blockfrostcrate.Looking at the OpenApi generator project I found out that they added TLS backend control last year since version
7.13.0and it was futher enhanced with later versions (e.g with configurable default backend in7.17.0).Additional impact
The generator also upgraded
reqwestto0.13+, which have some impacts (e.g. default backend switching fromnative-tlstorustls,rustls-tlsfeature renamed torustls)Another auto-generated change is the renaming of some enums variants from
ArraytoArrayVecString, I took a look at theblockfrost-rustcrate and those variants were not used here, so it should be fine as long as third party crates are not using them (which I don't know).Next
To allow full control of the TLS backend by child crates the
blockfrost-rustCargo.toml have to be updated to propagate the already available backend choice to the itsblockfrost-openapidependency.A base patch could be this one:
Several notes:
blockfrost-openapi0.1.84version is tentative.reqwestis upgraded to0.13.2to be consistent with the version now used inblockfrost-openapinative-tlsfeature since before native-tls backend could only be set though thedefault-tlsfeature which have changed torustlsrustls-tlsfeature torustlslike what reqwest didI can do a PR on the
blockfrost-rustrepository but I feel that those choices are not neutral, so they should be made by core maintainers.