Rerun C++ SDK
Loading...
Searching...
No Matches
spawn_options.hpp
1#pragma once
2
3#include <cstdint>
4#include <string_view>
5
6extern "C" struct rr_spawn_options;
7
8namespace rerun {
9
10 /// Options to control the behavior of `spawn`.
11 ///
12 /// Refer to the field-level documentation for more information about each individual options.
13 ///
14 /// The defaults are ok for most use cases.
15 ///
16 /// Keep this in sync with rerun.h's `rr_spawn_options`.
17 struct SpawnOptions {
18 /// The port to listen on.
19 uint16_t port = 9876;
20
21 /// An upper limit on how much memory the Rerun Viewer should use.
22 ///
23 /// When this limit is reached, Rerun will drop the oldest data.
24 /// Example: `16GB` or `50%` (of system total).
25 ///
26 /// Defaults to `75%` if unset.
27 std::string_view memory_limit = "75%";
28
29 /// Specifies the name of the Rerun executable.
30 ///
31 /// You can omit the `.exe` suffix on Windows.
32 ///
33 /// Defaults to `rerun` if unset.
34 std::string_view executable_name = "rerun";
35
36 /// Enforce a specific executable to use instead of searching though PATH
37 /// for `SpawnOptions::executable_name`.
38 std::string_view executable_path;
39
40 /// Convert to the corresponding rerun_c struct for internal use.
41 ///
42 /// _Implementation note:_
43 /// By not returning it we avoid including the C header in this header.
44 /// \private
45 void fill_rerun_c_struct(rr_spawn_options& spawn_opts) const;
46 };
47} // namespace rerun
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Options to control the behavior of spawn.
Definition spawn_options.hpp:17
uint16_t port
The port to listen on.
Definition spawn_options.hpp:19
std::string_view executable_name
Specifies the name of the Rerun executable.
Definition spawn_options.hpp:34
std::string_view memory_limit
An upper limit on how much memory the Rerun Viewer should use.
Definition spawn_options.hpp:27
std::string_view executable_path
Enforce a specific executable to use instead of searching though PATH for SpawnOptions::executable_na...
Definition spawn_options.hpp:38