https://github.com/zhuagenborn/brpc-project-template
🏗️ A C++ bRPC project template built with CMake and GitHub Actions.(使用CMake和GitHub Actions的C++ bRPC项目构建模板。)
https://github.com/zhuagenborn/brpc-project-template
brpc cmake
Last synced: 2 months ago
JSON representation
🏗️ A C++ bRPC project template built with CMake and GitHub Actions.(使用CMake和GitHub Actions的C++ bRPC项目构建模板。)
- Host: GitHub
- URL: https://github.com/zhuagenborn/brpc-project-template
- Owner: Zhuagenborn
- License: mit
- Created: 2025-07-12T14:35:12.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-12T17:29:46.000Z (3 months ago)
- Last Synced: 2025-07-12T19:28:32.337Z (3 months ago)
- Topics: brpc, cmake
- Language: C++
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# *C++* *bRPC* Project Template

[](https://cmake.org)
[](https://github.com/features/actions)
## Introduction
A *C++* *bRPC* project template on [*Ubuntu*](https://ubuntu.com) built with:
- [*bRPC*](https://brpc.apache.org)
- [*CMake*](https://cmake.org)
- [*GitHub Actions*](https://github.com/features/actions)## Getting Started
### Prerequisites
- Install *CMake*.
### Building *bRPC*
Install dependencies.
```bash
sudo apt-get install -y libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
```Clone and build *bRPC*.
```bash
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:
```bash
mkdir -p build
cd build
cmake -DBRPC_INSTALL_DIR= ..
cmake --build .
````` is the output directory of `brpc` (i.e., `brpc/output`), where `include` and `lib` folders are located.
## Structure
```console
.
├── .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
```