From fb840583d3b747ab2dc7e0456836c7835662e3df Mon Sep 17 00:00:00 2001 From: Opisthoteuthis agassizii <110026216+o-agassizii@users.noreply.github.com> Date: Tue, 9 Aug 2022 18:31:03 +0200 Subject: [PATCH] chore(docs): Update docs to mention new protoc requirements in tonic >= 0.8.0 (#1050) --- README.md | 25 +++++++++++++++++++++++++ examples/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/README.md b/README.md index cacbd72..75b11ac 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,31 @@ $ rustup update $ cargo build ``` +### Dependencies + +In order to build `tonic` >= 0.8.0, you need the `protoc` Protocol Buffers compiler, along with Protocol Buffers resource files. + +#### Ubuntu + +```bash +sudo apt update && sudo apt upgrade -y +sudo apt install -y protobuf-compiler libprotobuf-dev +``` + +#### Alpine Linux + +```sh +sudo apk add protoc protobuf-dev +``` + +#### macOS + +Assuming [Homebrew](https://brew.sh/) is already installed. (If not, see instructions for installing Homebrew on [the Homebrew website](https://brew.sh/).) + +```zsh +brew install protobuf +``` + ### Tutorials - The [`helloworld`][helloworld-tutorial] tutorial provides a basic example of using `tonic`, perfect for first time users! diff --git a/examples/README.md b/examples/README.md index e71c5bd..f11da34 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,6 +2,30 @@ Set of examples that show off the features provided by `tonic`. +In order to build these examples, you must have the `protoc` Protocol Buffers compiler +installed, along with the Protocol Buffers resource files. + +Ubuntu: + +```bash +sudo apt update && sudo apt upgrade -y +sudo apt install -y protobuf-compiler libprotobuf-dev +``` + +Alpine Linux: + +```sh +sudo apk add protoc protobuf-dev +``` + +macOS: + +Assuming [Homebrew](https://brew.sh/) is already installed. (If not, see instructions for installing Homebrew on [the Homebrew website](https://brew.sh/).) + +```zsh +brew install protobuf +``` + ## Helloworld ### Client