Skip to content

Add support more TLS cryptography libs #3137

Closed
Closed

Description

@Desiders

Motivation

Currently, we hardcode sqlx?/tls-rustls on runtime-{}-rustls, but sqlx support many other features:

tls-rustls = ["tls-rustls-ring"] # For backwards compatibility
tls-rustls-aws-lc-rs = []
tls-rustls-ring = ["tls-rustls-ring-webpki"] # For backwards compatibility
tls-rustls-ring-webpki = []
tls-rustls-ring-native-roots = []

I think we should support at least aws-lc-rs, because it is now the standard crypto library.

Proposed Solutions

Add feature like runtime-{}-rustls-ring (default via runtime-{}-rustls) and runtime-{}-rustls-aws-lc-rs

Additional Information

This isn't so much about one library offering advantages over another, but rather the problem that the lack of customization can lead to conflicts across libraries when someone hardcodes a variant.

Activity

  1. added theissue type on Jul 16, 2026
  2. Huliiiiii commented on Oct 8, 2026

    @Huliiiiii
    Member

    I added some documentation about this in #3227.

    I don't think it's a good idea to keep adding feature flags just to pass through SQLx's TLS backend options, especially since we may support other drivers in the future. I think it would be better to decouple these options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions