C++ implementation of Raft core logic as a replication library
1,204
stars
412
commits
C++
primary language
Aug 13, 2026
updated
Raft implementation derived from the cornerstone project, which is a very lightweight C++ implementation with minimum dependencies, originally written by Andy Chen.
New features that are not described in the original paper, but required for the real-world use cases in eBay, have been added. We believe those features are useful for others outside eBay as well.
cmake and openssl:$ sudo apt-get install cmake openssl libssl-dev libz-dev
$ brew install cmake
$ brew install openssl
$ git submodule update --init
$ ./prepare.sh
asio-1-24-0 into the project directory.C:\NuRaft> git clone https://github.com/chriskohlhoff/asio -b asio-1-24-0
$ mkdir build
$ cd build
build$ cmake ../
build$ make
Run unit tests
build$ ./runtests.sh
C:\NuRaft> mkdir build
C:\NuRaft> cd build
C:\NuRaft\build> cmake -G "NMake Makefiles" ..\
C:\NuRaft\build> nmake
You may need to run vcvars script first in your build directory. For example (it depends on how you installed MSVC):
C:\NuRaft\build> c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
If you project needs to integrate with NuRaft and you build your project with Conan you might want to have NuRaft built with Conan too. This is now supported: this project has conanfile.py which can be used to build locally and export the package to conan cache/repository or use it in editable mode locally.
conan build . - builds Release configurationconan build . -s build_type=Debug builds an alternative configuration supported by CMakeconan build . -o build_tests=TruePlease refer to this document.
Please refer to examples.
Please refer to tests/bench.
We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests.
Copyright 2017-present eBay Inc.
Author/Developer: Jung-Sang Ahn
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
URL: https://github.com/datatechnology/cornerstone
License: https://github.com/datatechnology/cornerstone/blob/master/LICENSE
Originally licensed under the Apache 2.0 license.
URL: https://github.com/stbrumme/crc32
Original Copyright 2011-2016 Stephan Brumme
See Original ZLib License: https://github.com/stbrumme/crc32/blob/master/LICENSE
URL: https://github.com/greensky00/simple_logger
License: https://github.com/greensky00/simple_logger/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/greensky00/testsuite
License: https://github.com/greensky00/testsuite/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/greensky00/latency-collector
License: https://github.com/greensky00/latency-collector/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/lcov_cobertura/lcov_cobertura.py
License: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/LICENSE
Copyright 2011-2012 Eric Wendelin
Originally licensed under the Apache 2.0 license.
URL: https://github.com/bilke/cmake-modules
License: https://github.com/bilke/cmake-modules/blob/master/LICENSE_1_0.txt
Copyright 2012-2017 Lars Bilke
Originally licensed under the BSD license.
(top 30 of 53)
C++
96.4%
CMake
1.9%
Python
1.5%
C++ implementation of Raft core logic as a replication library
1,204
stars
412
commits
C++
primary language
Aug 13, 2026
updated
Raft implementation derived from the cornerstone project, which is a very lightweight C++ implementation with minimum dependencies, originally written by Andy Chen.
New features that are not described in the original paper, but required for the real-world use cases in eBay, have been added. We believe those features are useful for others outside eBay as well.
cmake and openssl:$ sudo apt-get install cmake openssl libssl-dev libz-dev
$ brew install cmake
$ brew install openssl
$ git submodule update --init
$ ./prepare.sh
asio-1-24-0 into the project directory.C:\NuRaft> git clone https://github.com/chriskohlhoff/asio -b asio-1-24-0
$ mkdir build
$ cd build
build$ cmake ../
build$ make
Run unit tests
build$ ./runtests.sh
C:\NuRaft> mkdir build
C:\NuRaft> cd build
C:\NuRaft\build> cmake -G "NMake Makefiles" ..\
C:\NuRaft\build> nmake
You may need to run vcvars script first in your build directory. For example (it depends on how you installed MSVC):
C:\NuRaft\build> c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
If you project needs to integrate with NuRaft and you build your project with Conan you might want to have NuRaft built with Conan too. This is now supported: this project has conanfile.py which can be used to build locally and export the package to conan cache/repository or use it in editable mode locally.
conan build . - builds Release configurationconan build . -s build_type=Debug builds an alternative configuration supported by CMakeconan build . -o build_tests=TruePlease refer to this document.
Please refer to examples.
Please refer to tests/bench.
We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests.
Copyright 2017-present eBay Inc.
Author/Developer: Jung-Sang Ahn
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
URL: https://github.com/datatechnology/cornerstone
License: https://github.com/datatechnology/cornerstone/blob/master/LICENSE
Originally licensed under the Apache 2.0 license.
URL: https://github.com/stbrumme/crc32
Original Copyright 2011-2016 Stephan Brumme
See Original ZLib License: https://github.com/stbrumme/crc32/blob/master/LICENSE
URL: https://github.com/greensky00/simple_logger
License: https://github.com/greensky00/simple_logger/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/greensky00/testsuite
License: https://github.com/greensky00/testsuite/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/greensky00/latency-collector
License: https://github.com/greensky00/latency-collector/blob/master/LICENSE
Originally licensed under the MIT license.
URL: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/lcov_cobertura/lcov_cobertura.py
License: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/LICENSE
Copyright 2011-2012 Eric Wendelin
Originally licensed under the Apache 2.0 license.
URL: https://github.com/bilke/cmake-modules
License: https://github.com/bilke/cmake-modules/blob/master/LICENSE_1_0.txt
Copyright 2012-2017 Lars Bilke
Originally licensed under the BSD license.
(top 30 of 53)
C++
96.4%
CMake
1.9%
Python
1.5%