Skip to content

Remove support for native-tls#6409

Open
mgoldenberg wants to merge 13 commits intomatrix-org:mainfrom
mgoldenberg:remove-native-tls
Open

Remove support for native-tls#6409
mgoldenberg wants to merge 13 commits intomatrix-org:mainfrom
mgoldenberg:remove-native-tls

Conversation

@mgoldenberg
Copy link
Copy Markdown
Contributor

@mgoldenberg mgoldenberg commented Apr 2, 2026

Note: this pull request should be merged in conjunction with matrix-org/complement-crypto#236.

This pull request removes both the native-tls and rustls-tls feature flags in all crates where they exist. The resulting behavior is that rustls becomes the only TLS backend, and no others can be selected.

The benefit here is that rustls supports TLS v1.3 on all platforms, whereas native-tls does not (see #6053). Additionally, the native-tls and rustls-tls feature flags were not additive, but rather they were mutually exclusive. This is not an ideal property for feature flags.

From The Cargo Book

...features should be additive. That is, enabling a feature should not disable functionality, and it should usually be safe to enable any combination of features.


Closes #6383.

  • I've documented the public API Changes in the appropriate CHANGELOG.md files.
  • This PR was made with the help of AI.

Signed-off-by: Michael Goldenberg m@mgoldenberg.net

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (a65fec3) to head (ab83ed0).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6409      +/-   ##
==========================================
- Coverage   89.87%   89.85%   -0.02%     
==========================================
  Files         378      378              
  Lines      103445   103445              
  Branches   103445   103445              
==========================================
- Hits        92973    92953      -20     
- Misses       6902     6915      +13     
- Partials     3570     3577       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 2, 2026

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing mgoldenberg:remove-native-tls (ab83ed0) with main (a65fec3)

Open in CodSpeed

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Note that the rustls-tls feature flag is temporarily left in place
to keep other crates from breaking, but it becomes a trivial flag.
It will be removed altogether in a later commit.

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
…re flag

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
@mgoldenberg mgoldenberg marked this pull request as ready for review April 2, 2026 16:25
@mgoldenberg mgoldenberg requested a review from a team as a code owner April 2, 2026 16:25
@mgoldenberg mgoldenberg requested review from Hywan and removed request for a team April 2, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the native-tls feature

1 participant