Skip to content

Deprecate native-tls as well #4317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@ This new patch release has brought even more tiny fixes and improvements over th

The headlines of this release are:

- The cURL download backend is now officially deprecated and a warning will start to show up when it is used. [pr#4277]
- The cURL download backend and the native-tls TLS backend are now officially deprecated and a warning will start to show up when they are used. [pr#4277]

- While rustup predates reqwest and rustls, the rustup team has long wanted to standardize on
an HTTP + TLS stack in Rust, which should increase security, potentially improve performance, and
simplify maintenance of the project.
With the default download backend already switched to reqwest since [2019](https://github.com/rust-lang/rustup/pull/1660),
the team thinks it is time to start removing the cURL backend and focus on maintaining the Rust-based stack.
With the default download backend already switched to reqwest since [2019](https://github.com/rust-lang/rustup/pull/1660)
the team thinks it is time to focus maintenance on the Rust-based stack.

- The rustup team encourages everyone to switch to the reqwest backend, and would love to hear from
you about your use case via GitHub Issues if it does work against your particular setup.
11 changes: 9 additions & 2 deletions src/download/mod.rs
Original file line number Diff line number Diff line change
@@ -127,12 +127,19 @@ async fn download_file_(
let use_curl_backend = process.var_os("RUSTUP_USE_CURL").map(|it| it != "0");
if use_curl_backend == Some(true) {
warn!(
"RUSTUP_USE_CURL is set; the curl backend is deprecated, please file an issue if the \
default download backend does not work for your use case"
"RUSTUP_USE_CURL is set; the curl backend is deprecated,
please file an issue if the default download backend does not work for your use case"
);
}

let use_rustls = process.var_os("RUSTUP_USE_RUSTLS").map(|it| it != "0");
if use_rustls == Some(false) {
warn!(
"RUSTUP_USE_RUSTLS is set to `0`; the native-tls backend is deprecated,
please file an issue if the default download backend does not work for your use case"
);
}

let backend = match (use_curl_backend, use_rustls) {
// If environment specifies a backend that's unavailable, error out
#[cfg(not(feature = "reqwest-rustls-tls"))]