#grpc #http2 #tls #rpc #protobuf

ekiden-grpcio

The rust language implementation of gRPC, base on the gRPC c core library

1 unstable release

Uses old Rust 2015

0.3.2 Jul 14, 2018
0.3.1 Jul 14, 2018
0.3.0 Jul 13, 2018

#36 in #http2

38 downloads per month

Apache-2.0

25MB
553K SLoC

C 236K SLoC // 0.2% comments C++ 124K SLoC // 0.2% comments Perl 58K SLoC // 0.1% comments C# 28K SLoC // 0.2% comments Go 25K SLoC // 0.1% comments Python 24K SLoC // 0.2% comments Visual Studio Project 18K SLoC GNU Style Assembly 10K SLoC // 0.1% comments M4 9K SLoC // 0.2% comments Bazel 5K SLoC // 0.1% comments Rust 4.5K SLoC // 0.1% comments Shell 4K SLoC // 0.5% comments Ada 1.5K SLoC // 0.2% comments Assembly 1.5K SLoC // 0.2% comments Visual Studio Solution 1K SLoC Pascal 1K SLoC // 0.2% comments Bitbake 861 SLoC // 0.0% comments Automake 838 SLoC // 0.2% comments Forge Config 672 SLoC // 0.6% comments Scons 578 SLoC // 0.2% comments Batch 498 SLoC // 0.0% comments SQL 87 SLoC Xcode Config 65 SLoC // 0.7% comments Ruby 38 SLoC // 0.5% comments JavaScript 18 SLoC // 0.5% comments AWK 17 SLoC // 0.3% comments NuGet Config 17 SLoC PHP 9 SLoC // 0.6% comments Cython 7 SLoC // 0.6% comments D 5 SLoC

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
  • If you want to enable secure feature, 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

$ 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.3"

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.3", default-features = false, features = ["protobuf-codec"] }

Performance

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

Dependencies