neither hyper 1.0 upgrade guide nor the changelog explains how to upgrade usage of `Server` to 1.0
I have looked through the following:
- https://hyper.rs/guides/1/upgrading/
- https://github.com/hyperium/hyper/blob/master/CHANGELOG.md
- https://github.com/hyperium/hyper/blob/master/examples
- https://github.com/hyperium/hyper-util/tree/master/examples
None of these fully explain how to write the equivalent of a 0.14 Server with hyper 1.0
The upgrading guide points us towards https://docs.rs/hyper-util/latest/hyper_util/server/conn/auto/struct.Builder.html but then its not clear how to actually use that.
I suspect the best solution here would be to just add a Server example to hyper-util examples directory? Currently there is only a client example.
For reference our usage of hyper is just to provide a very simple interface for accessing and configuring metrics of a service: https://github.com/shotover/shotover-proxy/blob/0e8c2b00566616387d2f79d7f48dcdc59660785d/shotover/src/observability/mod.rs#L60-L112
Very true, I am struggling right now and if I cannot understand how to do it, I will just be stuck with 0.14
In my case the examples were sufficient to migrate simple request / response workload - I am now stuck trying to migrate a streaming endpoint and I cannot understand what I am doing wrong.
For reference: https://stackoverflow.com/questions/77929254/how-to-return-a-stream-using-hyper-in-rust?noredirect=1#comment137385887_77929254
Not sure what I can do to help in this case.
there are so many questions about this breaking. change,did hyper should separate this and expose it to developers,i think these should be handled in inner design,not break all of ecosystem such third part doc,article,best practice and require each developer make a big change
I kinda ran into this myself but I eventually figured it out, so I've just opened https://github.com/hyperium/hyper-util/pull/110 to add an example, which I hope will help others.
I havent personally tried it out since I ended up migrating to axum, but https://github.com/hyperium/hyper-util/pull/110 looks like it resolves this issue. Thanks @CobaltCause !