-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Could we maybe also add the example to the README.md and lib.rs files to make it a bit clearer how this works for people that just stumble upon it?
Done! I added the I also don't quite know what's the best way is to create doc tests. Could you point me in the right direciton? The README is now "complete", I copied your style from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
@gruberb looks like cargo fmt checks are failing; could you run cargo fmt and try again? |
@yoshuawuyts I am trying to figure out how to |
@gruberb you need to specify it as a dependency as a path to the local file. And in order to be able to publish your crate you also need to give it a fallback version. Example of how to do both here: https://github.com/rustasync/runtime/blob/master/Cargo.toml#L27 |
I struggle to figure out what changed since the latest commit: a4870c1 Since then, my example doesn't compile anymore:
I think we should still be able to pass a simple Server which implements HttpService to the |
@yoshuawuyts After lots of experimenting with the doc tests, the PR is ready in my view. I couldn't make the example in the docs work (https://github.com/rustasync/http-service/pull/19/files#diff-b4aea3e418ccdb71239b96952d9cddb6R5). So I The backtrace wasn't helpful either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
I added a first example. I came up with a lot of questions which hopefully can be answered by a more experienced http-service maintainer:
hyper-http-service
examples from thehttp-service
ones? If so, we can't show how to actually start a server but just how to compose one?hyper-http-service
, we need to re-create ourhttp-server
again?Motivation and Context
Making http-service more presentable and accessible (issue)
Checklist:
After working on this for a while, I would even suggest to merge
hyper-http-service
andhttp-service
? Since I can't see the use case for building ahttp-service
and then starting it differently? The user has to be aware to includehttp-service-hyper
in theirCargo.toml
, which is not really obvious.