top | item 22076762

(no title)

munmaek | 6 years ago

What do you use now? Warp?

discuss

order

_-___________-_|6 years ago

We just use hyper directly, with a small amount of glue code to use serde_json, serde_urlencoded for body parsing and a very simple (and very fast) router of our own creation. This approach also made it very simple for us to introduce std-future/async-await in a gradual way.

mojzu|6 years ago

I've been in the process of switching to tonic for the last few of weeks. Based on hyper/tower and has async/await support. It's a gRPC server rather than HTTP, so I've been using it with grpc-gateway to provide an HTTP OpenAPI v2 interface.

It has automated quite a few things I found dull to do in other server frameworks, from the gRPC .proto file I can generate:

- Rust server request/response types and request handler stubs. - grpc-gateway files and an OpenAPI v2 json spec. - Client side typescript types and request/response handlers from the OpenAPI spec.

So now the process of adding a new endpoint is much less time consuming and involves writing less repetitive and error prone code. As mentioned above I've only been using it a few weeks but so far it has been great, easier to use than actix-web and felt no less responsive.

dbcfd|6 years ago

Right now, if you want async/await, you either have warp or tide.

Hopefully gotham or rocket gets around to updating.

rudedogg|6 years ago

Can anyone comment on how close Rocket is to a 0.5 release? I’ve been wondering for awhile, but opening an issue to ask seems annoying.