6 releases

0.8.3 Mar 28, 2021
0.8.2 Sep 20, 2020
0.8.1 May 25, 2020
0.7.1 May 4, 2020
0.7.0 Apr 27, 2020

#39 in #http2

Download history 71/week @ 2024-05-10 35/week @ 2024-05-17 20/week @ 2024-05-24 32/week @ 2024-05-31 26/week @ 2024-06-07 32/week @ 2024-06-14 60/week @ 2024-06-21 72/week @ 2024-06-28 99/week @ 2024-07-05 86/week @ 2024-07-12 63/week @ 2024-07-19 97/week @ 2024-07-26 38/week @ 2024-08-02 64/week @ 2024-08-09 80/week @ 2024-08-16 46/week @ 2024-08-23

238 downloads per month
Used in 2 crates

MIT/Apache

120KB
3K SLoC

grpc-rust

Build Status License crates.io

Rust implementation of gRPC protocol, under development.

Some development questions in FAQ.

Current status

It basically works, but not suitable for production use.

See grpc-examples/src/bin/greeter_{client,server}.rs. It can be tested for example with go client:

# start greeter server implemented in rust
$ cargo run --bin greeter_server

# ... or start greeter server implemented in go
$ go get -u google.golang.org/grpc/examples/helloworld/greeter_client
$ greeter_server

# start greeter client implemented in rust
$ cargo run --bin greeter_client rust
> message: "Hello rust"

# ... or start greeter client implemented in go
$ go get -u google.golang.org/grpc/examples/helloworld/greeter_client
$ greeter_client rust
> 2016/08/19 05:44:45 Greeting: Hello rust

Route guide

Route guide example implementation in grpc-rust is in grpc-examples folder.

How to generate rust code

There are two ways to generate rust code from .proto files

Invoke protoc programmatically with protoc-rust-grpc crate

(Recommended)

Have a look at readme in protoc-rust-grpc crate.

With protoc command and protoc-gen-rust-grpc plugin

Readme

Use generated protos in your project:

In Cargo.toml:

[dependencies]
grpc            = "~0.7"
protobuf        = "~2"
futures         = "~0.3"

[build-dependencies]
protoc-rust-grpc = "~0.7"

TODO

  • Fix performance
  • More tests
  • In particular, add more compatibility tests, they live in interop directory
  • Fix all TODO in sources
  • grpc-rs — alternative implementation of gRPC in Rust, a wrapper to C++ implementation
  • httpbis — implementation of HTTP/2, which is used by this implementation of gRPC
  • rust-protobuf — implementation of Google Protocol Buffers

Dependencies

~8.5MB
~141K SLoC