softprops / hyperlocal

🔌 ✨rustlang hyper bindings for local unix domain sockets
MIT License
227 stars 46 forks source link

Upgrade hyper from 0.14 to 1.1 #65

Closed iamjpotts closed 6 months ago

iamjpotts commented 6 months ago

Upgrades hyper from 0.14 to 1.1.

Their upgrade guide

Upgrades both the client example and server example. The server example is now based on hyper's new server implementation guide.

What was hyper 0.14 has now been split up into multiple crates. Hyper 1.0 also removes Server and consequentially there are no direct alternatives for a UnixServerExt to extend, though the upgrade guide does mention

For a server type that can handle both HTTP/1 and HTTP/2 at the same time, use the server::conn::auto::Builder from hyper-util.

That recommendation for hyper_util::server::conn::auto::Builder isn't a replacement for the old Server type, as it handles single socket/tcp connections at a time, rather than implementing a looping listener that automatically accepts all new connections.

Testing

Questions

  1. With the removal of src/server.rs, the server trait now only controls the additional dependencies required by examples/server.rs - which a client obviously wouldn't want. Should we keep the feature configuration of this crate as it is, or do you have some thoughts on changing the features? Should we rename the server feature to server-example ?

  2. Do you want the crate version updated in this PR, or left alone? If updated, do you want 0.9.0 or 0.9.0-alpha in this PR or something else?

fussybeaver commented 6 months ago

@softprops Grateful if you could take a look

iamjpotts commented 6 months ago

Fixed code style