You should have already installed the C++ SDK.
We assume you have a working C++ toolchain and are using CMake to build your project. For this project we will let Rerun download and build Apache Arrow's C++ library itself. To learn more about how Rerun's CMake script can be configured, see CMake Setup in Detail in the C++ reference documentation.
Setting up your CMakeLists.txt
A minimal CMakeLists.txt looks like this:
cmake_minimum_required(VERSION 3.16...3.27)
project(example_project LANGUAGES CXX)
add_executable(example_project main.cpp)
# Download the rerun_sdk
include(FetchContent)
FetchContent_Declare(rerun_sdk URL
https://github.com/rerun-io/rerun/releases/latest/download/rerun_cpp_sdk.zip)
FetchContent_MakeAvailable(rerun_sdk)
# Link against rerun_sdk.
target_link_libraries(example_project PRIVATE rerun_sdk)Note that Rerun requires at least C++17. Depending on the SDK will automatically ensure that C++17 or newer is enabled.
Includes
To use Rerun all you need to include is rerun.hpp:
#include <rerun.hpp>Building
cmake -B build
cmake --build build -j
./build/example_projectYou're now ready to follow the Log and Ingest tutorial.