commit | 6ed67676b88981813a7d3a2d51b8582fc8284cc7 | [log] [tgz] |
---|---|---|
author | Jay <BusyJay@users.noreply.github.com> | Thu Jan 23 04:24:47 2020 |
committer | GitHub <noreply@github.com> | Thu Jan 23 04:24:47 2020 |
tree | 5e5e65e3d6268c233055099a3c56374e0cb4b349 | |
parent | 952a03f85010802e3773b85aa10ce53b22e19cf6 [diff] |
*: use libz-sys instead of bundled one (#419) * *: use libz-sys instead of bundled one When using the built-in cmake to build zlib, it changes the source tree as madler/zlib#162 describes. This leads to the failure during [generating the docs][1]. So let's switch to libz-sys instead, which uses its own custom script to build zlib, and leave source tree as it is. Switching to libz-sys can also reduce the package size as we can ignore more sub modules. It should improve compile time if libz-sys is also a dependency of other crates. The only shortcoming is that libz-sys may not be compatible with grpcio, but I believe the chance is quite small given it's such a small library. And giving it's such a small library, the benifits like compile time or package size described above may be too small to be observed. [1]: https://docs.rs/crate/grpcio/0.5.0-alpha.5/builds/196235. Signed-off-by: Jay Lee <busyjaylee@gmail.com>
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.
This project is still under development. The following features with the check marks are supported:
For Linux and MacOS, you also need to install gcc (or clang) too.
For Windows, you also need to install following software:
$ git submodule update --init --recursive # if you just cloned the repository $ cargo build
To generate the sources from proto files:
$ cargo install protobuf-codegen
$ cargo install grpcio-compiler
$ protoc --rust_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_rust_plugin` example.proto
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"
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"] }
See benchmark to find out how to run a benchmark by yourself.
See cross_compile