tag | ab7d43f88139dc0c00d954e22cad64f3ba27e75a | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Sep 18 11:12:36 2023 -0700 |
object | b7a6f5938fe6c35af3cd9c0967485af224d3f873 |
Android 13.0.0 release 77
commit | b7a6f5938fe6c35af3cd9c0967485af224d3f873 | [log] [tgz] |
---|---|---|
author | Roopa Sattiraju <sattiraju@google.com> | Wed Dec 22 18:01:35 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Dec 22 18:01:35 2021 +0000 |
tree | 772fcd2e6530512a1c685e462bdea6a7acfeb75f | |
parent | 43a1f64afa8144029befcfee0e8fb6cefb24eecc [diff] | |
parent | ae948e978ad223b3b8453630a2d8d9727fff7db2 [diff] |
Adding bluetooth apex am: d895f09966 am: 58661cbf35 am: 3e6ed5ebfd am: ae948e978a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/grpcio/+/1931382 Change-Id: Id37381a9af3f5ccb02914bec1bbf4bace11ee59c
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 4.9+ (or clang) too.
Bindings are pre-generated for x86_64/arm64 Linux. For other platforms, bindings are generated at compile time.
For Windows, you also need to install following software:
$ cargo xtask submodule # if you just cloned the repository $ cargo build
If you're getting linker errors when building your project using gRPC-rs
, head down to the openssl
feature section for a possible fix.
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.6"
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.6", default-features = false, features = ["protobuf-codec"] }
prost-codec
and protobuf-codec
gRPC-rs
uses protobuf
crate by default. If you want to use prost
instead, you can enable prost-codec
feature. You probably only want to enable only one of the two features. Though grpcio is completely fine with both features enabled at the same time, grpcio-compiler will not going to work as expected.
openssl
and openssl-vendored
gRPC-rs
comes vendored with gRPC Core
, which by default uses BoringSSL instead of OpenSSL. This may cause linking issues due to symbol clashes and/or missing symbols when another one of your dependencies uses OpenSSL. To resolve this, you can tell gRPC-rs
to use OpenSSL too by specifying "openssl"
in your Cargo.toml
's features list for gprcio
, which requires openssl (>=1.0.2). E.g.:
[dependencies] grpcio = { version = "0.6", features = ["openssl"] }
Feature openssl-vendored
is the same as feature openssl
except it will build openssl from bundled sources.
See benchmark to find out how to run a benchmark by yourself.
See cross_compile
Make sure to format and test the code before sending a PR.
If the content in grpc-sys/grpc is updated, you may need to regenerate bindings:
$ cargo xtask bindgen