hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.08k stars 1.55k forks source link

Expose Service and HttpService without features #3590

Closed tottoto closed 4 weeks ago

tottoto commented 3 months ago

I would suppose that hyper-util would be good to allow users to enable http1 or/and http2 feature separately when using server-auto feature (although it is a breaking change). As hyper-util uses Service and HttpService to implement server-auto feature, these traits are required without http{1,2} features. Since these traits do not actually require optional dependencies, the drawback to expose them seems small comparing the benefit.

tottoto commented 3 months ago

This allows hyper-util to enable its service util without http1 and http2 features as well.

refs: https://github.com/hyperium/hyper-util/pull/79

tottoto commented 3 months ago

https://github.com/hyperium/hyper-util/pull/105 is a motivation for this proposal.