January 2019
Intermediate to advanced
520 pages
14h 32m
English
Create a new binary crate and open Cargo.toml in an editor. We will explore every section of this file, because building a gRPC example is more complex than services that use flexible interaction protocols such as JSON-RPC. We'll use Edition 2018, as we do for most examples in this book:
[package]name = "grpc-ring"version = "0.1.0"authors = ["your email"]edition = "2018"
In dependencies, we need a basic set of crates—failure, log, and env_logger. Also, we add the protobuf crate. We won't use it directly, but it's used by generated Rust sources that we will get from a protocol description later in this section. The most important crate from the current example is grpc. We will use a version from GitHub, because the crate is in ...
Read now
Unlock full access