Skip to content

Commit 718e30e

Browse files
committed
download: Remove cURL backend
1 parent 2ce2428 commit 718e30e

11 files changed

+19
-377
lines changed

Cargo.lock

-56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ repository = "https://github.com/rust-lang/rustup.rs"
1313
description = "Manage multiple rust installations with ease"
1414

1515
[features]
16-
default = ["curl-backend", "reqwest-backend"]
17-
curl-backend = ["download/curl-backend"]
18-
reqwest-backend = ["download/reqwest-backend"]
1916
vendored-openssl = ['openssl/vendored']
2017
# Include in the default set to disable self-update and uninstall.
2118
no-self-update = []
@@ -32,8 +29,7 @@ home = "0.5"
3229
lazy_static = "1"
3330
libc = "0.2"
3431
opener = "0.4.0"
35-
# Used by `curl` or `reqwest` backend although it isn't imported
36-
# by our rustup.
32+
# Used by `reqwest` although it isn't imported by our rustup.
3733
openssl = { version = "0.10", optional = true }
3834
pulldown-cmark = { version = "0.6", default-features = false }
3935
rand = "0.7"

README.md

-19
Original file line numberDiff line numberDiff line change
@@ -559,25 +559,6 @@ On Windows, the command would be:
559559
set https_proxy=socks5://proxy.example.com:1080
560560
```
561561

562-
If you need a more complex setup, rustup supports the convention used by
563-
the __curl__ program, documented in the ENVIRONMENT section of
564-
[its manual page][curlman].
565-
566-
The use of `curl` is presently **deprecated**, however it can still be used by
567-
providing the `RUSTUP_USE_CURL` environment variable, for example:
568-
569-
```bash
570-
RUSTUP_USE_CURL=1 rustup update
571-
```
572-
573-
Note that some versions of `libcurl` apparently require you to drop the
574-
`http://` or `https://` prefix in environment variables. For example,
575-
`export http_proxy=proxy.example.com:1080` (and likewise for HTTPS).
576-
If you are getting an SSL `unknown protocol` error from `rustup` via `libcurl`
577-
but the command-line `curl` command works fine, this may be the problem.
578-
579-
[curlman]: https://curl.haxx.se/docs/manpage.html
580-
581562

582563
## Examples
583564

ci/build-run-docker.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ docker run \
5656

5757
# check that rustup-init was built with ssl support
5858
# see https://github.com/rust-lang/rustup.rs/issues/1051
59-
if ! (nm target/"${TARGET}"/release/rustup-init | grep -q Curl_ssl_version); then
59+
if ! (nm target/"${TARGET}"/release/rustup-init | grep -q openssl_sys); then
6060
echo "Missing ssl support!!!!" >&2
6161
exit 1
6262
fi

download/Cargo.toml

+3-11
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@ authors = [ "Brian Anderson <[email protected]>" ]
77

88
license = "MIT/Apache-2.0"
99

10-
[features]
11-
12-
default = ["reqwest-backend"]
13-
14-
curl-backend = ["curl"]
15-
reqwest-backend = ["reqwest", "env_proxy", "lazy_static"]
16-
1710
[dependencies]
11+
lazy_static = "1.0"
12+
env_proxy = "0.3.1"
1813
error-chain = "0.12"
14+
reqwest = { version = "0.9.14", features = ["socks"] }
1915
url = "1.7"
20-
curl = { version = "0.4.11", optional = true }
21-
env_proxy = { version = "0.3.1", optional = true }
22-
lazy_static = { version = "1.0", optional = true }
23-
reqwest = { version = "0.9.14", features = ["socks"], optional = true }
2416

2517
[dev-dependencies]
2618
futures = "0.1"

download/src/errors.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error_chain! {
55

66
foreign_links {
77
Io(std::io::Error);
8-
Reqwest(::reqwest::Error) #[cfg(feature = "reqwest-backend")];
8+
Reqwest(::reqwest::Error);
99
}
1010

1111
errors {
@@ -16,9 +16,5 @@ error_chain! {
1616
FileNotFound {
1717
description("file not found")
1818
}
19-
BackendUnavailable(be: &'static str) {
20-
description("download backend unavailable")
21-
display("download backend '{}' unavailable", be)
22-
}
2319
}
2420
}

0 commit comments

Comments
 (0)