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 /// Hide the normal Rerun welcome screen.
30 ///
31 /// Defaults to `false` if unset.
32 bool hide_welcome_screen = false;
33
34 /// Specifies the name of the Rerun executable.
35 ///
36 /// You can omit the `.exe` suffix on Windows.
37 ///
38 /// Defaults to `rerun` if unset.
39 std::string_view executable_name = "rerun";
40
41 /// Enforce a specific executable to use instead of searching though PATH
42 /// for `SpawnOptions::executable_name`.
43 std::string_view executable_path;
44
45 /// Convert to the corresponding rerun_c struct for internal use.
46 ///
47 /// _Implementation note:_
48 /// By not returning it we avoid including the C header in this header.
49 /// \private
50 void fill_rerun_c_struct(rr_spawn_options& spawn_opts) const;
51 };
52} // namespace rerun
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
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
bool hide_welcome_screen
Hide the normal Rerun welcome screen.
Definition spawn_options.hpp:32
std::string_view executable_name
Specifies the name of the Rerun executable.
Definition spawn_options.hpp:39
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:43