Skip to content
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

Migrate to using libcurl for now instead of hyper #434

Merged
merged 1 commit into from May 12, 2016

Conversation

Projects
None yet
2 participants
@alexcrichton
Copy link
Member

alexcrichton commented May 10, 2016

Unfortunately the move to rust-native-tls has had some hiccups on Windows and
Hyper also currently doesn't support features like HTTP proxies (but support's
coming soon!). For now this temporarily moves over to using libcurl to weed out
these problems until we get to a point where we're hyper's features are more
filled out. This also somewhat aligns with Cargo as well which is using libcurl
currently.

This does not use the curl crate on crates.io because it doesn't support
streaming downloads. Instead I've got an in-progress rewrite which is just
binding much more directly to libcurl's APIs (e.g. exposing the callback
functions directly). This branch is in a git repo currently and I hope to
upstream it to curl-rust soon as well.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 10, 2016

I wouldn't merge this just yet as I'm still filling out some details on the Windows side of libcurl, but hopefully those should be addressed shortly.

@@ -152,161 +154,84 @@ pub fn tee_file<W: io::Write>(path: &Path, mut w: &mut W) -> io::Result<()> {
}
}

pub fn download_file<P: AsRef<Path>>(url: hyper::Url,
pub fn download_file<P: AsRef<Path>>(url: &str,

This comment has been minimized.

@brson

brson May 10, 2016

Contributor

Can you instead switch to url::Url instead of str (it's already used instead of hyper::Url everywhere els)? I hope to push Urls upward through the APIs to improve type safety.

@brson

This comment has been minimized.

Copy link
Contributor

brson commented May 10, 2016

Thanks @alexcrichton

@alexcrichton alexcrichton force-pushed the alexcrichton:curl branch from 3eaf5ec to 3c760af May 10, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 10, 2016

Updated to thread Url through much farther, I'll ping once CI for curl is green

@alexcrichton alexcrichton force-pushed the alexcrichton:curl branch 2 times, most recently from 336d754 to 7e56481 May 10, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 10, 2016

I think this is good to go but I'd prefer to wait for Windows CI to come along and agree. That.. may take awhile.

@brson

This comment has been minimized.

Copy link
Contributor

brson commented May 10, 2016

I killed the builds in front of it in appveyor. As soon as the first target is green I'll merge and start the build on master.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 10, 2016

This probably wants to wait at least until the MinGW target gets green, I still have yet to see a green build of curl on appveyor unfortunately. I think I've fixed it locally though.

@brson

This comment has been minimized.

Copy link
Contributor

brson commented May 11, 2016

@alexcrichton Failed on gnu.

@alexcrichton alexcrichton force-pushed the alexcrichton:curl branch from 7e56481 to 268097e May 11, 2016

@brson brson referenced this pull request May 11, 2016

Closed

Curl #436

@alexcrichton alexcrichton force-pushed the alexcrichton:curl branch 8 times, most recently from 7981839 to 65e0cbc May 11, 2016

Migrate to using libcurl for now instead of hyper
Unfortunately the move to rust-native-tls has had some hiccups on Windows and
Hyper also currently doesn't support features like HTTP proxies (but support's
coming soon!). For now this temporarily moves over to using libcurl to weed out
these problems until we get to a point where we're hyper's features are more
filled out. This also somewhat aligns with Cargo as well which is using libcurl
currently.

This does not use the `curl` crate on crates.io because it doesn't support
streaming downloads. Instead I've got an in-progress rewrite which is just
binding much more directly to libcurl's APIs (e.g. exposing the callback
functions directly). This branch is in a git repo currently and I hope to
upstream it to curl-rust soon as well.

@alexcrichton alexcrichton force-pushed the alexcrichton:curl branch from 65e0cbc to 5fc6377 May 11, 2016

@brson brson merged commit e56f96b into rust-lang:master May 12, 2016

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.