-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add features to allow choosing between reqwest or curl for downloading #525
Conversation
client.get(url, Some((start, end))) | ||
} | ||
|
||
pub fn resolve_url(url: &str, _status: &mut dyn StatusBackend) -> Result<String> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not implement something similar to the reqwest implementation, but I not sure that the implementation is really necessary.
51dc619
to
a1d5b26
Compare
Thanks — I appreciate the work you're doing to increase the system's flexibility here! The implementation looks solid. The only comment I have is that there should be a bit of documentation. Would you mind adding some text to README.md describing the feature, and CHANGELOG.md listing the change for the next release notes? |
Would be nice to have this also in the oxidized fork of Tectonic - https://github.com/crlf0710/tectonic |
Codecov Report
@@ Coverage Diff @@
## master #525 +/- ##
==========================================
+ Coverage 45.51% 45.52% +<.01%
==========================================
Files 137 138 +1
Lines 59920 59927 +7
==========================================
+ Hits 27272 27279 +7
Misses 32648 32648
Continue to review full report at Codecov.
|
@malbarbo I've pushed a commit that merges current |
It took a year, but I have finally merged this functionality in #726!
should do it. This is one of the the things that I feel much better implementing using the new sub-crate architecture, made possible by cbindgen, a better understanding of how Rust's sys crates work, and Cranko. |
Thanks @pkgw for moving this forward. |
Tectonic used to use hyper, but in #330 it was replaced by reqwest. This PR allow using curl as an alternative to reqwest.
One reason to use curl instead of reqwest is that the number of dependencies is smaller (117 vs 239), reducing the compilation time (9min vs 15min of cpu itme) and size of the binary (3,7MB vs 7,2MB).
Another reason is that curl have builtin support for proxy (although I haven't test it) which would solves #59.
The curl crate will build libcurl if one is not installed in the build system and static link it, so this does not increase the native dependencies.
This also adds a mock download backend allowing to build tectonic without download support, which can be interest to assert that tectonic cannot make network connections.