grpc-rust

Rust implementation of gRPC

Github星跟踪图

grpc-rust

Build Status
License
crates.io

Rust implementation of gRPC protocol, under development.

Some development questions in FAQ.

Current status

It basically works. 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

Client and server are implemented asynchronously.

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.6"
protobuf        = "~2"
futures         = "~0.1"
futures-cpupool = "~0.1"

[build-dependencies]
protoc-rust-grpc = "0.6.1"

In lib.rs or main.rs (or any other submodule):

extern crate protobuf;
extern crate grpc;
extern crate futures;
extern crate futures_cpupool;

pub mod myproto;
pub mod myproto_grpc;

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

主要指标

概览
名称与所有者stepancheg/grpc-rust
主编程语言Rust
编程语言Rust (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-06-28 19:26:35
推送于2024-04-08 23:37:29
最后一次提交2024-04-09 00:37:29
发布数24
最新版本名称v0.8.3 (发布于 )
第一版名称v0.1.2 (发布于 )
用户参与
星数1.4k
关注者数31
派生数124
提交数682
已启用问题?
问题数138
打开的问题数59
拉请求数33
打开的拉请求数1
关闭的拉请求数28
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?