Project to compare gRPC libraries written in Rust.
- sources/tower-grpc
- sources/grpc-rs
- sources/grpc-rust
- using stepancheg/grpc-rust: Rust implementation of gRPC
- notes: it seems not maintained. cannot create service according to examples in this repository.
Install docker
and docker-compose
first.
Create a container to build crates:
$ ./scripts/setup-protoc-docker.sh
Build crates on the container:
$ ./scripts/run_tests.sh
Launch a server and run its client with docker-compose.
For tower-grpc:
$ docker-compose up tower_grpc_client
...
tower_grpc_client_1 | RESPONSE = Response { metadata: MetadataMap { headers: {"content-type": "application/grpc+proto", "date": "Sat, 05 Oct 2019 05:05:24 GMT"} }, message: HelloReply { message: "Zomg, it works!" } }
aisabi_tower_grpc_client_1 exited with code 0
For grpc-rs:
$ docker-compose up grpc_rs_client
...
grpc_rs_client_1 | [2019-10-05T05:04:48Z INFO grpc_rs_client] client started...!
grpc_rs_client_1 | [2019-10-05T05:04:48Z INFO grpc_rs_client] Greeter received: hello, world!
aisabi_grpc_rs_client_1 exited with code 0