-
-
Notifications
You must be signed in to change notification settings - Fork 695
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
Remove hyper: Use methods in viz and axum. #2047
Conversation
I have found googling the solution to this stuff troublesome So I'm just making notes for myself, that will also be useful in review. Also this change log contains this pivotal sentence The free functions hyper::body::to_bytes and aggregate have been removed. Similar functionality is on http_body_util::BodyExt::collect. |
48368de
to
8cc5e8f
Compare
This is a experimental PR. At two places in the codebase "A" is converted to "B" - where A)
B)
The question becomes is this the best use of the new API to convert all My current thoughts into_iter() is not free ! and collect.cocat().into() is cumbersome. |
8cc5e8f
to
5c2a5c7
Compare
Just making notes for myself in public There is good discussion here about the various ways or iterating over a Result type. The strategies to handle the error type. |
Cool, we now have a base line -- a change that passes tests I am still worried about the performance implications here. Regarding clones and copies .. I am not sure this is bad, indifference or a good change Please be aware I am still thinking about this ... I will ask on discord in the morning if there are any standard ways the gauge a suspected performance regressions. |
To justify that last change hyper is a low level API and we are now accessing that functionality through the viz module, or through the axum module. Modules on which we directly depend. From a maintenance perspective this is a good change, less dependencies to track. |
e568ce1
to
cb6bdfb
Compare
You can check my PR #2082, it moves everything to http 1.0 and axum 0.7. It uses the http-body-util to get the bytes in a easier way. Right now all examples, except for the one which depends on axum_js_fetch is converted. This examples also requires an update on gloo-net, for which I made a PR, let's see if it gets merged. PS: For Viz, you can't move to http 1.0, because Viz hasn't update yet to hyper 1 and http 1. We need to wait a bit. Maybe make a PR for it? |
Thanks, StreamBody and BoxBody -- leads to a much cleaner solution
I will help out on that where possible. |
hyper 1.0 has been released
-hyper = "0.14.23"
+hyper = "1"
Conventionally 0.x releases are considered pre-releases.
It seems hyper is acting in this vein.
here is the relevant blogs post, which is linked in the release notes.
stability-promise