Skip to content
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

neither hyper 1.0 upgrade guide nor the changelog explains how to upgrade usage of Server to 1.0 #3560

Closed
rukai opened this issue Feb 5, 2024 · 4 comments
Labels
A-docs Area: documentation.

Comments

@rukai
Copy link

rukai commented Feb 5, 2024

I have looked through the following:

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

@rukai rukai added the C-bug Category: bug. Something is wrong. This is bad! label Feb 5, 2024
@siscia
Copy link

siscia commented Feb 6, 2024

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.

@joebnb
Copy link

joebnb commented Feb 7, 2024

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

@dswij dswij added A-docs Area: documentation. and removed C-bug Category: bug. Something is wrong. This is bad! labels Feb 14, 2024
@CobaltCause
Copy link

I kinda ran into this myself but I eventually figured it out, so I've just opened hyperium/hyper-util#110 to add an example, which I hope will help others.

@rukai
Copy link
Author

rukai commented Apr 4, 2024

I havent personally tried it out since I ended up migrating to axum, but hyperium/hyper-util#110 looks like it resolves this issue.
Thanks @CobaltCause !

@rukai rukai closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation.
Projects
None yet
Development

No branches or pull requests

5 participants