Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
/ grpc-worknote Public archive

personal experiments with grpc(v1.25+) for C++

Notifications You must be signed in to change notification settings

luncliff/grpc-worknote

Repository files navigation

References

How To

Build

Simply run with the CMake. Its version must be 3.14 or later.

cmake_minimum_required(VERSION 3.14)

VcPkg

The project requires VcPkg. Expects 2019.08 release or later

$ vcpkg install --triplet x64-windows grpc catch2 ms-gsl

After the installation, run CMake with the CMAKE_TOOLCHAIN_FILE.

$ cd /code/build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE="/vcpkg/scripts/buildsystem/vcpkg.cmake"
$ cmake --build . --config debug

Code generation for gRPC

There are several CMake targets to support code generations. Each can be used like the following

$ cd /code/build
$ cmake --build . --target generate_grpc_files_cpp

Current codegen target list:

  • codegen_cpp
  • codegen_python
  • codegen_nodejs
  • codegen_csharp
  • codegen_go

Especially, Go requires additional setup to acquire code generator.

export GOPATH=$(pwd)
go get github.com/golang/protobuf/protoc-gen-go

Or, for PowerShell,

$env:GOPATH=Get-Location
go get github.com/golang/protobuf/protoc-gen-go

By doing this, 'bin/' folder will contain 'protoc-gen-go' executable.

Test

CTest is enabled

TBA

About

personal experiments with grpc(v1.25+) for C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published