Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

🏗️ A C++ bRPC project template built with CMake and GitHub Actions.(使用CMake和GitHub Actions的C++ bRPC项目构建模板。)

License

Notifications You must be signed in to change notification settings

Zhuagenborn/bRPC-Project-Template

Repository files navigation

C++ bRPC Project Template

C++ CMake GitHub Actions Linux

Introduction

A C++ bRPC project template on Ubuntu built with:

Getting Started

Prerequisites

  • Install CMake.

Building bRPC

Install dependencies.

sudo apt-get install -y libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev

Clone and build bRPC.

git clone https://github.com/apache/brpc.git
cd brpc
sh config_brpc.sh --headers=/usr/include --libs=/usr/lib
make

Building the Echo Service

Go to the project folder and run:

mkdir -p build
cd build
cmake -DBRPC_INSTALL_DIR=<brpc-path> ..
cmake --build .

<brpc-path> is the output directory of brpc (i.e., brpc/output), where include and lib folders are located.

Structure

.
├── .clang-format
├── .gitignore
├── CITATION.cff
├── client
│   ├── client.cpp
│   └── CMakeLists.txt
├── CMakeLists.txt
├── .github
│   └── workflows
│       └── cmake.yaml
├── docs
│   └── badges
│       ├── C++.svg
│       ├── Linux.svg
│       ├── Made-with-CMake.svg
│       └── Made-with-GitHub-Actions.svg
├── LICENSE
├── proto
│   ├── echo.proto
│   └── msg.proto
├── README.md
└── server
    ├── CMakeLists.txt
    └── server.cpp

About

🏗️ A C++ bRPC project template built with CMake and GitHub Actions.(使用CMake和GitHub Actions的C++ bRPC项目构建模板。)

Topics

Resources

License

Stars

Watchers

Forks