Skip to content
The gRPC library for Rust built on C Core library and futures
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create issue templates. (#221) Oct 23, 2018
benchmark
compiler
examples
grpc-sys support using vendored openssl (#262) Apr 11, 2019
interop Ignore intermittent tests (#310) Apr 9, 2019
proto make `./proto` buildable (#311) Apr 7, 2019
scripts Apply Clang-Tidy's suggestions (#240) Oct 26, 2018
src
tests fix misspell (#314) Apr 9, 2019
.clang-format Add format script (#206) Jul 16, 2018
.clang-tidy Apply Clang-Tidy's suggestions (#240) Oct 26, 2018
.gitignore Zero copy for receive (#222) Oct 19, 2018
.gitmodules grpc-sys: use submodule instead (#66) Jul 14, 2017
.travis.yml support using vendored openssl (#262) Apr 11, 2019
CHANGELOG.md fix misspell (#314) Apr 9, 2019
CODE_OF_CONDUCT.md Create Code of Conduct (#220) Sep 8, 2018
Cargo.toml
LICENSE Initial commit Apr 21, 2017
README.md
appveyor.yml Upgrade gRPC to v1.14.2 (#203) Sep 14, 2018
cross_compile.md make it possible to cross-compile for iOS and Android targets (#285) Feb 14, 2019

README.md

gRPC-rs

gRPC-rs is a Rust wrapper of gRPC Core. gRPC is a high performance, open source universal RPC framework that puts mobile and HTTP/2 first.

Crates.io docs.rs Build Status Build status

Status

This project is still under development. The following features with the check marks are supported:

  • Basic asynchronous unary/steaming call
  • SSL
  • Generic call
  • Connection level compression
  • Interoperability test
  • QPS benchmark
  • Custom metadata
  • Health check
  • Reflection
  • Authentication
  • Load balance

Prerequisites

  • CMake >= 3.8.0
  • Rust >= 1.19.0
  • binutils >= 2.22
  • By default, the secure feature is enabled, therefore Go (>=1.7) is required.

For Linux and MacOS, you also need to install gcc (or clang) too.

For Windows, you also need to install following software:

  • Active State Perl
  • yasm
  • Visual Studio 2015+

Build

$ git submodule update --init --recursive # if you just cloned the repository
$ cargo build

Usage

To generate the sources from proto files:

Option 1 - Manual Generation

  1. Install the protobuf compiler:
$ cargo install protobuf-codegen
  1. Install the gRPC compiler:
$ cargo install grpcio-compiler
  1. Generate the sources:
$ protoc --rust_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_rust_plugin` example.proto

Option 2 - Programmatic Generation

Programmatic generation can be used to generate Rust modules from proto files via your build.rs by using protoc-grpcio.

For more information and examples see README.

To include this project as a dependency:

[dependencies]
grpcio = "0.4"

Feature secure

secure feature enables support for TLS encryption and some authentication mechanism. When you do not need it, for example when working in intranet, you can disable it by using the following configuration:

[dependencies]
grpcio = { version = "0.4", default-features = false, features = ["protobuf-codec"] }

Performance

See benchmark to find out how to run a benchmark by yourself.

Cross Compile

See cross_compile

You can’t perform that action at this time.