You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to make own crate based on any of the examples using the README as a main information source.
I was succeeded after I googled https://hyper.rs/guides/1/client/basic/, and I would do this faster if there wasn't any README in examples folder (I used to trust README files)
@seanmonstar If hyper can't be used without the code, then maybe it shouldn't live in a separate hyper_util ?
The whole idea is to allow users to easily choose a reactor for hyper (while also making it independent of tokio). tokio is the one mainly used at the moment, so some common and simple implementations for tokio with hyper are provided in the hyper-util crate instead.
I do agree with the desire for the examples to be immediately usable. Perhaps the best solution is to convert the examples into a crate that's part of the workspace, instead of the crate "examples", and then we can properly depend on hyper-util in there. Is there a downside I'm not thinking off?
What are the objections against exposing support::TokioIo publicly? Having an example which is essentially unusable without depending on a third-party library is very strange, and led to quite a bit of head scratching on my part.
Even though hyper is reactor agnostic, it should have an implementation which works with a rector implementation out of the box. No flexibility is lost, while also allowing new users to Fall into the pit of success
Activity
seanmonstar commentedon Nov 28, 2023
As mentioned in the hello example, we can't depend on
hyper-utilinhyper, because then it becomes a cyclical dependency.Unless we changed the examples to not be a separate crate, instead of natural examples of hyper.
inferrna commentedon Nov 29, 2023
Ok. Steps to reproduce.
I was succeeded after I googled https://hyper.rs/guides/1/client/basic/, and I would do this faster if there wasn't any README in examples folder (I used to trust README files)
BuddhiAbeyratneAL commentedon Dec 20, 2023
can be closed.
erikschul commentedon Jan 5, 2024
@seanmonstar If hyper can't be used without the code, then maybe it shouldn't live in a separate
hyper_util?notgull commentedon Jan 5, 2024
You can have non-Tokio reactors for Hyper, e.g. https://github.com/notgull/smol-hyper
dswij commentedon Jan 9, 2024
The whole idea is to allow users to easily choose a reactor for
hyper(while also making it independent oftokio).tokiois the one mainly used at the moment, so some common and simple implementations fortokiowithhyperare provided in thehyper-utilcrate instead.seanmonstar commentedon Jan 9, 2024
I do agree with the desire for the examples to be immediately usable. Perhaps the best solution is to convert the examples into a crate that's part of the workspace, instead of the crate "examples", and then we can properly depend on
hyper-utilin there. Is there a downside I'm not thinking off?dswij commentedon Jan 9, 2024
@seanmonstar or perhaps we can point users directly to
hyper-utilcrate for examples? with a note saying hyper itself is for a lower-level usecasethrawn01 commentedon Jun 9, 2024
What are the objections against exposing
support::TokioIopublicly? Having an example which is essentially unusable without depending on a third-party library is very strange, and led to quite a bit of head scratching on my part.Even though hyper is reactor agnostic, it should have an implementation which works with a rector implementation out of the box. No flexibility is lost, while also allowing new users to Fall into the pit of success
dswij commentedon Jun 10, 2024
We provided a simple Tokio runtime implementations in hyper-util.
This is not a third-party library, it's maintained by hyper's maintainers.
thrawn01 commentedon Jun 10, 2024
Thanks, I found it before commenting here. It says
This crate is less-stable than hyper, Which doesn't fill me with confidence.Should we consider it stable and safe to use with hyper 1.0?
dswij commentedon Jun 10, 2024
It is safe to use with hyper 1.0.