-
Notifications
You must be signed in to change notification settings - Fork 25
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
switch to hyper? #24
Comments
using rustls feature ( reqwest: hyper: |
See: #22 |
for the sake of completeness I also compared the last feature: using reqwest: hyper: |
We had hyper, and user @kate-shine worked a PR, switching to reqwest. I'd like you to discuss this reasoning, I'm mostly not working on this crate anymore. |
The reason for me to switch to reqwest was a more stable API and prevention of unnecessary boilerplate code on the side of the library. Usage of reqwest is recommended by the authors of hyper as well. I'm not completely opposed to switching back to pure hyper, but fighting for every dependency at all cost seems quite pointless to me. Especially if this dependency used for convenience is one of best supported ones. |
Looking at the code I do not see the boilerplate that was removed. Please see the PR diffs: #25
The statement says If you are looking for a convenient HTTP client, then you may wish to consider reqwest. True this applies if you make use of those convenient features. I am opposed paying costs of things I am not using and as the diff shows the code changes are minimal, the convenience gained is minimal but as my benchmarks proof the price is real.
The crate is stable, there is little benefit from keeping dead weight around, and I still argue that it does not return the invest. |
Sorry, I didn't have time to look at the PR before. Yes, you are correct. Former switch to reqwest has led to leaner code, but your changes don't change that. (personally, for our purpose, it would actually make more sense and lead to less dependencies if there was an awc version, as we use it in the actix-web environment) |
@pimeys anything else you need for this? |
I love this crate. We are using it for months now, just one thing kept bugging me: the usage of
reqwest
where most of their features are irrelevant to us in this context.I threw together a quick test and here are the comparisons:
I build the example for comparison both using
cargo b --release --example simple_sender
.using reqwest:
compilation units: 138
binary size: 5.5 MB
compile time: 2m 17s
using hyper:
compilation units: 114
binary size: 3.6 MB
compile time: 1m 42s
are you interested in a PR for this?
The text was updated successfully, but these errors were encountered: