-
Notifications
You must be signed in to change notification settings - Fork 49
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
http-client's future #98
Comments
Yeah that makes a lot of sense. Do you have a sketch of what that API would look like? I'm still interested in eventually implementing a win32-native HTTP client backend. Getting a sense of what that would look like under this model would be nice. |
I don’t think anything would change other than the removal of the intermediate crate. |
Does that mean surf will replace http-client? I'm kind of confused right now. |
Yes |
Oh but Surf only supports async-std. I think that defeats the purpose of http-client crate. |
You can still run surf with the hyper backend...? |
Dependency doesn't seem to be optional https://github.com/http-rs/surf/blob/main/Cargo.toml#L67 or maybe I misunderstood something. I'm not that experienced in Rust 😄 |
Do you actually use |
I planned to use it as an abstraction for API client libraries to avoid coupling them to specific async runtime and HTTP client. |
Then you will need to help me maintain surf with an |
How would this be solved if The problem with Rust right now is that the async ecosystem is pretty much an opinionated mess and many api client libraries just choose 1 http client for the job, mostly It doesn't give a lot of freedom with async runtime choice and feature flags is mostly just additional boilerplate code that's hard to maintain. What users of these libraries can do is either move to the supported runtime, write their own library or fork the existing library and replace the runtime or add support to another runtime via feature flags. |
Upcoming Rust 2021 edition will also solve some of feature flags hell. If I am not mistaken resolver 2 can be explicitly used from older versions of rust. |
For Surf 3.0 I am almost certainly going to merge http-client back into it. The feature flag mess currently is hellish and maintaining it is a bad experience. Most of this would be solved by not having surf set downstream feature flags.
If you use
http-client
for a client other than surf you either need to step up and help me maintain this or lose it. Thanks.The text was updated successfully, but these errors were encountered: