Skip to content

JerichoSystems/redis-asio

Repository files navigation

CircleCI

redis_asio

Asynchronous C++ client library for Redis, using Boost.Asio and Hiredis.

Features

  • Modern C++ (C++23)
  • Asynchronous API using Boost.Asio
  • Hiredis backend
  • Example and test suite included

Requirements

  • CMake >= 3.21
  • C++23 compiler (GCC >= 13, Clang >= 16, MSVC >= 2022)
  • Boost (Asio)
  • Hiredis & Hiredis SSL
  • GTest (for tests)

Coverage

  • Local run: cmake -S . -B build -DREDIS_ASIO_BUILD_TESTS=ON -DREDIS_ASIO_ENABLE_COVERAGE=ON, then cmake --build build --target coverage. Reports appear in build/coverage/index.html and coverage.xml.
  • CI: the CircleCI Linux/macOS Debug jobs always publish the same HTML/XML coverage artifacts; grab the latest run from the CircleCI pipelines page and download coverage/index.html.
  • benchmark (for benches)

All dependencies can be installed via vcpkg or your system package manager.

Building

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Running Examples

After building, run the example(s) from the build directory:

./build/psub_async

Running Tests

To build and run the tests:

cmake -B build -DREDIS_ASIO_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure

The test executables are not installed by default. To package them alongside the library, enable both REDIS_ASIO_BUILD_TESTS and REDIS_ASIO_INSTALL_TESTS when configuring CMake.

License

MIT License. See LICENSE file.

About

Asynchronous C++ client library for Redis, using Boost.Asio and Hiredis.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors