Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.68 KB

File metadata and controls

42 lines (30 loc) · 1.68 KB

C++ quick start

Installing the Rerun Viewer

The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP.

If you need to install the viewer, follow the installation guide. Two of the more common ways to install the Rerun are:

  • Via cargo: cargo install rerun-cli --locked
  • Via pip: pip install rerun-sdk

After you have installed it, you should be able to type rerun in your terminal to start the viewer.

Using the Rerun C++ SDK with CMake

include(FetchContent)
FetchContent_Declare(rerun_sdk URL
    https://github.com/rerun-io/rerun/releases/latest/download/rerun_cpp_sdk.zip)
FetchContent_MakeAvailable(rerun_sdk)

This will download a bundle with pre-built Rerun C static libraries for most desktop platforms, all Rerun C++ sources and headers, as well as CMake build instructions for them. By default this will in turn download & build Apache Arrow's C++ library which is required to build the Rerun C++. To learn more about how Rerun's CMake script can be configured, see CMake Setup in Detail in the C++ reference documentation.

Make sure you link with rerun_sdk:

target_link_libraries(your_executable PRIVATE rerun_sdk)

Logging your own data

Put the following code to your main.cpp:

${EXAMPLE_CODE_CPP_SPAWN}

Build and run your C++ program; you should see the points in this viewer:

Demo recording

${HOW_DOES_IT_WORK}