27 releases

0.8.3 Mar 28, 2021
0.8.2 Sep 20, 2020
0.8.1 May 25, 2020
0.6.2 Jan 14, 2020
0.0.1 Aug 23, 2016

#14 in #developing

Download history 5123/week @ 2024-07-21 7143/week @ 2024-07-28 5912/week @ 2024-08-04 6098/week @ 2024-08-11 5663/week @ 2024-08-18 5783/week @ 2024-08-25 5599/week @ 2024-09-01 6462/week @ 2024-09-08 5393/week @ 2024-09-15 3924/week @ 2024-09-22 5504/week @ 2024-09-29 4079/week @ 2024-10-06 5206/week @ 2024-10-13 4203/week @ 2024-10-20 4145/week @ 2024-10-27 3955/week @ 2024-11-03

17,799 downloads per month
Used in fewer than 17 crates

MIT/Apache

120KB
3K SLoC

grpc-rust

The project is dead; long live the new project

gRPC team is developing shiny new gRPC implementation in Rust, grpc crate name is transferred to them.

This code is no longer maintained.

Original README.md

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.8"
protobuf        = "2.23"
futures         = "~0.3"

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

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

~7MB
~114K SLoC