Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.13 KB

File metadata and controls

58 lines (44 loc) · 1.13 KB

Ring Buffer Cpp

A minimalist C++23 ring buffer.

Features

  • Raw dynamically allocated array to reduce reliance on stl.

Prerequisites

Development Setup

Enter the reproducible development shell (Clang):

nix develop

(If using direnv, simply run direnv allow)

Or pick a toolchain explicitly -- CC/CXX are set by the shell, so the same CMake presets work in both:

nix develop .#clang
nix develop .#gcc

The Nix package builds follow the same scheme (clang is the default):

nix build           # Clang
nix build .#gcc     # GCC

Both toolchains ship clangd, clang-format and clang-tidy; the debugger matches the compiler (lldb for Clang, gdb for GCC).

Building

Configure the project using CMake presets:

cmake --preset default

Build the project (Debug by default):

cmake --build --preset debug

For a release build (optimized, no sanitizers):

cmake --build --preset release

Testing

Run the test suite:

ctest --preset debug