rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Replace custom download crate with reqwest

Open brson opened this issue 8 years ago • 5 comments

reqwest is mature enough that I don't feel the need to keep maintaining an abstraction layer, and would rather be using pure Rust instead of curl.

Make sure that it continues obeying the relevant environment variables for setting up proxies.

brson avatar Mar 17 '17 01:03 brson

One thing to mention, I notice proxy support is still a work in progress (https://github.com/seanmonstar/reqwest/issues/30).

jelford avatar Mar 17 '17 07:03 jelford

Ah ok, we probably need to wait then, though somebody could go ahead and overhaul the code such that it supports only curl and reqwest, so reqwest can be switched on later.

brson avatar Mar 17 '17 21:03 brson

It seems that proxy support has been added a while back, see: https://github.com/seanmonstar/reqwest/pull/152

However, I can't find a way to measure the progress of files that are being downloaded, and I don't think reqwest supports reporting the download progress yet. I believe a feature like this is desired, as the current download implementation in rustup also reports the download progress.

Edit: apparently it is possible using the implemented Read trait over the reqwest Response object, in a similar fashion as this hyper implementation. Although it seems quite hacky.

timvisee avatar Mar 19 '18 22:03 timvisee

We've been using reqwest by default for a while now, but there're still some issues on odd minority platforms which we haven't solved which means curl based downloads are currently still needed. I'll keep an eye on this.

kinnison avatar Oct 29 '19 21:10 kinnison

Looks like a perfect final step for #3790! I've added this to the task list.

rami3l avatar Jun 09 '24 15:06 rami3l

I think we can close this now? We're using reqwest by default, which IMO is good enough to cover the original ask here.

djc avatar Apr 04 '25 11:04 djc

@djc Not yet; it's about the download crate. The end goal, of course, is that download crate becomes a part of our single crate. I've done that linking for you.

rami3l avatar Apr 04 '25 11:04 rami3l