Default to rustls and enable couchdb backend by default#16
Merged
Conversation
Switches the default TLS implementation for the sqlite and couchdb backends to rustls so out-of-the-box builds do not require a system OpenSSL. Also enables backend-couchdb and backend-dynamodb in the default feature set; both are pure-Rust now that they use rustls.
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.
Summary
backend-sqlite,backend-couchdb, andbackend-redisto rustls, so a stock build no longer needs a system OpenSSL / libssl-dev.backend-couchdbin the default feature set (pure Rust now that it uses rustls; negligible binary-size cost).backend-dynamodbopt-in. Enabling it pulls in the AWS SDK (DynamoDB + STS/SSO credential SDKs) and adds ~13 MB to a stripped release binary, which is too much to enable for everyone by default. Documented this in the Readme.Binary size check (release + stripped,
examples/basic)Measured with the default release profile (no LTO). With
lto = "fat"the delta would likely shrink, but it's still a substantial dep, so opt-in is the safer default.Notes / trade-offs
sqlxruntime feature,reqwestTLS backend,redistokio-tls comp). sqlite itself doesn't even use TLS — the feature just selects which TLS implsqlx's tokio runtime links against.backend-sqlite-native-tls/backend-couchdb-native-tls. The Readme has been updated to reflect the new defaults.Test plan
cargo checkwith all default backends enabledcargo checkwith only redis + rustls compcargo build --releasesize comparison with and without dynamodb