From 341b5abef5a039a731c9da260c4e9b76b1849415 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 8 Mar 2016 17:16:29 -0800 Subject: [PATCH 1/2] Doc Fixit: src/cpp/README need more information --- src/cpp/README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/cpp/README.md b/src/cpp/README.md index baeba08315552..a13669b99e133 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -6,3 +6,62 @@ This directory contains source code for C++ implementation of gRPC. #Status Beta + +#Pre-requisites + +##Linux + +```sh + $ [sudo] apt-get install build-essential autoconf libtool +``` + +##Mac OSX + +For a Mac system, git is not available by default. You will first need to +install Xcode from the Mac AppStore and then run the following command from a +terminal: + +```sh + $ [sudo] xcode-select --install +``` + +##Protoc + +By default gRPC uses [protocol buffers](https://github.com/google/protobuf), +you will need the `protoc` compiler to generate stub server and client code. + +If you compile gRPC from source, as described below, the Makefile will +automatically try and compile the `protoc` in third party if you cloned the +repository recursively and it detects that you don't already have it +installed. + +If it hasn't been installed, you can run the following commands to install it. + +```sh +$ cd grpc/third_party/protobuf +$ sudo make install # 'make' should have been run by core grpc +``` + +Alternatively, you can download `protoc` binaries from +[the protocol buffers Github repository](https://github.com/google/protobuf/releases). + +#INSTALLATION + +Currently to install gRPC for C++, you need to build from source as described below. + +#Build from Source + +```sh + $ git clone https://github.com/grpc/grpc.git + $ cd grpc + $ git submodule update --init + $ make + $ [sudo] make install +``` + +#DOCUMENTATION + +- The gRPC C++ refenrence documentation is available online at + [grpc.io](http://www.grpc.io/docs/tutorials/basic/c.html) +- [Helloworld example](../../examples/cpp/helloworld) + From 798b0dc4426f4485ad108a04c2dd44285ba2e700 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 9 Mar 2016 12:00:09 -0800 Subject: [PATCH 2/2] Doc Fixit: src/cpp/README need more information, revised 03092016 - Revised 'protoc' section and 'Documentation' section as LisaFC suggested. - Added 'Examples' section as LisaFC suggested. Resolves: #5661 --- src/cpp/README.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/cpp/README.md b/src/cpp/README.md index a13669b99e133..83d37aa2ed8b9 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -30,10 +30,8 @@ terminal: By default gRPC uses [protocol buffers](https://github.com/google/protobuf), you will need the `protoc` compiler to generate stub server and client code. -If you compile gRPC from source, as described below, the Makefile will -automatically try and compile the `protoc` in third party if you cloned the -repository recursively and it detects that you don't already have it -installed. +If you compile gRPC from source, as described below, this also installs the +`protoc` compiler. If it hasn't been installed, you can run the following commands to install it. @@ -45,9 +43,10 @@ $ sudo make install # 'make' should have been run by core grpc Alternatively, you can download `protoc` binaries from [the protocol buffers Github repository](https://github.com/google/protobuf/releases). -#INSTALLATION +#Installation -Currently to install gRPC for C++, you need to build from source as described below. +Currently to install gRPC for C++, you need to build from source as described +below. #Build from Source @@ -59,9 +58,25 @@ Currently to install gRPC for C++, you need to build from source as described be $ [sudo] make install ``` -#DOCUMENTATION +#Documentation -- The gRPC C++ refenrence documentation is available online at - [grpc.io](http://www.grpc.io/docs/tutorials/basic/c.html) -- [Helloworld example](../../examples/cpp/helloworld) +You can find out how to build and run our simplest gRPC C++ example in our +[C++ quick start](https://github.com/grpc/grpc/tree/{{ site.data.config.grpc_release_branch }}/examples/cpp). +For more detailed documentation on using gRPC in C++ , see our main +documentation site at [grpc.io](http://grpc.io), specifically: + +* [Overview](http://www.grpc.io/docs/): An introduction to gRPC with a simple + Hello World example in all our supported languages, including C++. +* [gRPC Basics - C++](http://www.grpc.io/docs/tutorials/basic/c.html): + A tutorial that steps you through creating a simple gRPC C++ example + application. +* [Asynchronous Basics - C++](http://www.grpc.io/docs/tutorials/async/helloasync-cpp.html): + A tutorial that shows you how to use gRPC C++'s asynchronous/non-blocking + APIs. + + +# Examples + +Code examples for gRPC C++ live in this repository's +[examples/cpp](https://github.com/grpc/grpc/tree/{{ site.data.config.grpc_release_branch }}/examples/cpp) directory.