Rerun C++ SDK
Loading...
Searching...
No Matches
recording_stream.hpp
1#pragma once
2
3#include <chrono>
4#include <cstdint> // uint32_t etc.
5#include <filesystem>
6#include <limits>
7#include <optional>
8#include <string_view>
9#include <type_traits>
10#include <vector>
11
12#include "as_components.hpp"
13#include "component_column.hpp"
14#include "error.hpp"
15#include "log_sink.hpp"
16#include "spawn_options.hpp"
17#include "time_column.hpp"
18
19namespace rerun {
20 struct ComponentBatch;
21
22 enum class StoreKind {
23 Recording,
24 Blueprint,
25 };
26
27 /// What happens when a client connects to a gRPC server?
28 enum class PlaybackBehavior {
29 /// Start playing back all the old data first,
30 /// and only after start sending anything that happened since.
32
33 /// Prioritize the newest arriving messages,
34 /// replaying the history later, starting with the newest.
36 };
37
38 /// A `RecordingStream` handles everything related to logging data into Rerun.
39 ///
40 /// ## Multithreading and ordering
41 ///
42 /// A `RecordingStream` is thread-safe.
43 ///
44 /// Internally, all operations are linearized into a pipeline:
45 /// - All operations sent by a given thread will take effect in the same exact order as that
46 /// thread originally sent them in, from its point of view.
47 /// - There isn't any well defined global order across multiple threads.
48 ///
49 /// This means that e.g. flushing the pipeline (`flush_blocking`) guarantees that all
50 /// previous data sent by the calling thread has been recorded; no more, no less.
51 /// (e.g. it does not mean that all file caches are flushed)
52 ///
53 /// ## Shutdown
54 ///
55 /// The `RecordingStream` can only be shutdown by dropping all instances of it, at which point
56 /// it will automatically take care of flushing any pending data that might remain in the
57 /// pipeline.
58 ///
59 /// TODO(andreas): The only way of having two instances of a `RecordingStream` is currently to
60 /// set it as a the global.
61 ///
62 /// Shutting down cannot ever block.
63 ///
64 /// ## Logging
65 ///
66 /// Internally, the stream will automatically micro-batch multiple log calls to optimize
67 /// transport.
68 /// See [SDK Micro Batching](https://www.rerun.io/docs/reference/sdk/micro-batching) for
69 /// more information.
70 ///
71 /// The data will be timestamped automatically based on the `RecordingStream`'s
72 /// internal clock.
74 private:
75 // TODO(grtlr): Ideally we'd expose more of the `EntityPath` struct to the C++ world so
76 // that we don't have to hardcode this here.
77 static constexpr const char PROPERTIES_ENTITY_PATH[] = "__properties/";
78
79 public:
80 /// Creates a new recording stream to log to.
81 ///
82 /// \param app_id The user-chosen name of the application doing the logging.
83 /// \param recording_id The user-chosen name of the recording being logged to.
84 /// \param store_kind Whether to log to the recording store or the blueprint store.
86 std::string_view app_id, std::string_view recording_id = std::string_view(),
87 StoreKind store_kind = StoreKind::Recording
88 );
90
91 /// \private
93
94 // TODO(andreas): We could easily make the recording stream trivial to copy by bumping Rusts
95 // ref counter by adding a copy of the recording stream to the list of C recording streams.
96 // Doing it this way would likely yield the most consistent behavior when interacting with
97 // global streams (and especially when interacting with different languages in the same
98 // application).
99 /// \private
100 RecordingStream(const RecordingStream&) = delete;
101 /// \private
102 RecordingStream() = delete;
103
104 // -----------------------------------------------------------------------------------------
105 /// \name Properties
106 /// @{
107
108 /// Returns the store kind as passed during construction
109 StoreKind kind() const {
110 return _store_kind;
111 }
112
113 /// Returns whether the recording stream is enabled.
114 ///
115 /// All log functions early out if a recording stream is disabled.
116 /// Naturally, logging functions that take unserialized data will skip the serialization step as well.
117 bool is_enabled() const {
118 return _enabled;
119 }
120
121 /// @}
122
123 // -----------------------------------------------------------------------------------------
124 /// \name Controlling globally available instances of RecordingStream.
125 /// @{
126
127 /// Replaces the currently active recording for this stream's store kind in the global scope
128 /// with this one.
129 ///
130 /// Afterwards, destroying this recording stream will *not* change the global recording
131 /// stream, as it increases an internal ref-count.
132 void set_global() const;
133
134 /// Replaces the currently active recording for this stream's store kind in the thread-local
135 /// scope with this one
136 ///
137 /// Afterwards, destroying this recording stream will *not* change the thread local
138 /// recording stream, as it increases an internal ref-count.
139 void set_thread_local() const;
140
141 /// Retrieves the most appropriate globally available recording stream for the given kind.
142 ///
143 /// I.e. thread-local first, then global.
144 /// If neither was set, any operations on the returned stream will be no-ops.
145 static RecordingStream& current(StoreKind store_kind = StoreKind::Recording);
146
147 /// @}
148
149 // -----------------------------------------------------------------------------------------
150 /// \name Directing the recording stream.
151 /// \details Either of these needs to be called, otherwise the stream will buffer up indefinitely.
152 /// @{
153
154 /// Stream data to multiple sinks.
155 ///
156 /// See specific sink types for more information:
157 /// * `FileSink`
158 /// * `GrpcSink`
159 template <typename... Ts>
160 Error set_sinks(const Ts&... sinks) const {
161 LogSink out_sinks[] = {sinks...};
162 uint32_t num_sinks = sizeof...(Ts);
163 return try_set_sinks(out_sinks, num_sinks);
164 }
165
166 /// Connect to a remote Rerun Viewer on the given URL.
167 ///
168 /// Requires that you first start a Rerun Viewer by typing 'rerun' in a terminal.
169 ///
170 /// \param url The scheme must be one of `rerun://`, `rerun+http://`, or `rerun+https://`,
171 /// and the pathname must be `/proxy`. The default is `rerun+http://127.0.0.1:9876/proxy`.
172 ///
173 /// This function returns immediately.
174 Error connect_grpc(std::string_view url = "rerun+http://127.0.0.1:9876/proxy") const;
175
176 /// Swaps the underlying sink for a gRPC server sink pre-configured to listen on `rerun+http://{bind_ip}:{port}/proxy`.
177 ///
178 /// The gRPC server will buffer all log data in memory so that late connecting viewers will get all the data.
179 /// You can control the amount of data buffered by the gRPC server with the `server_memory_limit` argument.
180 /// Once reached, the earliest logged data will be dropped. Static data is never dropped.
181 ///
182 /// Returns the URI of the gRPC server so you can connect to it from a viewer.
183 ///
184 /// This function returns immediately.
186 std::string_view bind_ip = "0.0.0.0", uint16_t port = 9876,
187 std::string_view server_memory_limit = "1GiB",
189 std::vector<std::string> cors_allow_origins = {}
190 ) const;
191
192 /// Spawns a new Rerun Viewer process from an executable available in PATH, then connects to it
193 /// over gRPC.
194 ///
195 /// If a Rerun Viewer is already listening on this port, the stream will be redirected to
196 /// that viewer instead of starting a new one.
197 ///
198 /// \param options See `rerun::SpawnOptions` for more information.
199 Error spawn(const SpawnOptions& options = {}) const;
200
201 /// @see RecordingStream::spawn
202 template <typename TRep, typename TPeriod>
204 const SpawnOptions& options = {},
205 std::chrono::duration<TRep, TPeriod> flush_timeout = std::chrono::seconds(2)
206 ) const {
207 using seconds_float = std::chrono::duration<float>; // Default ratio is 1:1 == seconds.
208 return spawn(options, std::chrono::duration_cast<seconds_float>(flush_timeout).count());
209 }
210
211 /// Stream all log-data to a given `.rrd` file.
212 ///
213 /// The Rerun Viewer is able to read continuously from the resulting rrd file while it is being written.
214 /// However, depending on your OS and configuration, changes may not be immediately visible due to file caching.
215 /// This is a common issue on Windows and (to a lesser extent) on MacOS.
216 ///
217 /// This function returns immediately.
218 Error save(std::string_view path) const;
219
220 /// Stream all log-data to standard output.
221 ///
222 /// Pipe the result into the Rerun Viewer to visualize it.
223 ///
224 /// If there isn't any listener at the other end of the pipe, the `RecordingStream` will
225 /// default back to `buffered` mode, in order not to break the user's terminal.
226 ///
227 /// This function returns immediately.
228 //
229 // NOTE: This should be called `stdout` like in other SDK, but turns out that `stdout` is a
230 // macro when compiling with msvc [1].
231 // [1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/stdin-stdout-stderr?view=msvc-170
233
234 /// Initiates a flush the batching pipeline and waits for it to propagate.
235 ///
236 /// \param timeout_sec The minimum time the SDK will wait during a flush before potentially
237 /// dropping data if progress is not being made. If you pass in FLT_MAX or infinity,
238 /// the function will block until it either succeeds or fails.
239 ///
240 /// Returns an error if we fail to flush all previously sent log messages.
241 ///
242 /// See `RecordingStream` docs for ordering semantics and multithreading guarantees.
243 Error flush_blocking(float timeout_sec = std::numeric_limits<float>::infinity()) const;
244
245 /// @}
246
247 // -----------------------------------------------------------------------------------------
248 /// \name Controlling log time (index).
249 /// \details
250 /// @{
251
252 /// Set the index value of the given timeline as a sequence number, for the current calling thread.
253 ///
254 /// Used for all subsequent logging performed from this same thread, until the next call
255 /// to one of the time setting methods.
256 ///
257 /// For example: `rec.set_time_sequence("frame_nr", frame_nr)`.
258 ///
259 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
260 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
261 void set_time_sequence(std::string_view timeline_name, int64_t sequence_nr) const;
262
263 /// Set the index value of the given timeline as a duration, for the current calling thread.
264 ///
265 /// Used for all subsequent logging performed from this same thread, until the next call
266 /// to one of the time setting methods.
267 ///
268 /// For example: `rec.set_time_duration("runtime", time_since_start)`.
269 ///
270 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
271 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
272 template <typename TRep, typename TPeriod>
274 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> duration
275 ) const {
276 auto nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
277 set_time_duration_nanos(timeline_name, nanos);
278 }
279
280 /// Set the index value of the given timeline as a duration in seconds, for the current calling thread.
281 ///
282 /// Used for all subsequent logging performed from this same thread, until the next call
283 /// to one of the time setting methods.
284 ///
285 /// For example: `rec.set_time_duration_secs("runtime", seconds_since_start)`.
286 ///
287 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
288 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
289 void set_time_duration_secs(std::string_view timeline_name, double secs) const {
290 set_time_duration_nanos(timeline_name, static_cast<int64_t>(1e9 * secs + 0.5));
291 }
292
293 /// Set the index value of the given timeline as a duration in nanoseconds, for the current calling thread.
294 ///
295 /// Used for all subsequent logging performed from this same thread, until the next call
296 /// to one of the time setting methods.
297 ///
298 /// For example: `rec.set_time_duration_nanos("runtime", nanos_since_start)`.
299 ///
300 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
301 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
302 void set_time_duration_nanos(std::string_view timeline_name, int64_t nanos) const;
303
304 /// Set the index value of the given timeline as a timestamp, for the current calling thread.
305 ///
306 /// Used for all subsequent logging performed from this same thread, until the next call
307 /// to one of the time setting methods.
308 ///
309 /// For example: `rec.set_time_timestamp("capture_time", now())`.
310 ///
311 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
312 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
313 template <typename TClock>
315 std::string_view timeline_name, std::chrono::time_point<TClock> timestamp
316 ) const {
318 timeline_name,
319 std::chrono::duration_cast<std::chrono::nanoseconds>(timestamp.time_since_epoch())
320 .count()
321 );
322 }
323
324 /// Set the index value of the given timeline as seconds since Unix Epoch (1970), for the current calling thread.
325 ///
326 /// Used for all subsequent logging performed from this same thread, until the next call
327 /// to one of the time setting methods.
328 ///
329 /// For example: `rec.set_time_timestamp_secs_since_epoch("capture_time", secs_since_epoch())`.
330 ///
331 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
332 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
333 void set_time_timestamp_secs_since_epoch(std::string_view timeline_name, double seconds)
334 const {
336 timeline_name,
337 static_cast<int64_t>(1e9 * seconds)
338 );
339 }
340
341 /// Set the index value of the given timeline as nanoseconds since Unix Epoch (1970), for the current calling thread.
342 ///
343 /// Used for all subsequent logging performed from this same thread, until the next call
344 /// to one of the time setting methods.
345 ///
346 /// For example: `rec.set_time_timestamp_nanos_since_epoch("capture_time", nanos_since_epoch())`.
347 ///
348 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
349 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
350 void set_time_timestamp_nanos_since_epoch(std::string_view timeline_name, int64_t nanos)
351 const;
352
353 /// Set the current time of the recording, for the current calling thread.
354 ///
355 /// Used for all subsequent logging performed from this same thread, until the next call
356 /// to one of the time setting methods.
357 ///
358 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
359 ///
360 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
361 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
362 template <typename TClock>
363 [[deprecated("Renamed to `set_time_timestamp`")]] void set_time(
364 std::string_view timeline_name, std::chrono::time_point<TClock> time
365 ) const {
366 set_time(timeline_name, time.time_since_epoch());
367 }
368
369 /// Set the current time of the recording, for the current calling thread.
370 ///
371 /// Used for all subsequent logging performed from this same thread, until the next call
372 /// to one of the time setting methods.
373 ///
374 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
375 ///
376 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
377 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
378 template <typename TRep, typename TPeriod>
379 [[deprecated("Renamed `set_time_duration`")]] void set_time(
380 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> time
381 ) const {
382 set_time_duration(timeline_name, time);
383 }
384
385 /// Set the current time of the recording, for the current calling thread.
386 ///
387 /// Used for all subsequent logging performed from this same thread, until the next call
388 /// to one of the time setting methods.
389 ///
390 /// For example: `rec.set_time_seconds("sim_time", sim_time_secs)`.
391 ///
392 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
393 /// @see set_time_sequence, set_time_nanos, reset_time, set_time, disable_timeline
394 [[deprecated("Use either `set_time_duration_secs` or `set_time_timestamp_secs_since_epoch`"
395 )]] void
396 set_time_seconds(std::string_view timeline_name, double seconds) const {
397 set_time_duration_secs(timeline_name, seconds);
398 }
399
400 /// Set the current time of the recording, for the current calling thread.
401 ///
402 /// Used for all subsequent logging performed from this same thread, until the next call
403 /// to one of the time setting methods.
404 ///
405 /// For example: `rec.set_time_nanos("sim_time", sim_time_nanos)`.
406 ///
407 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
408 /// @see set_time_sequence, set_time_seconds, reset_time, set_time, disable_timeline
409 [[deprecated(
410 "Use either `set_time_duration_nanos` or `set_time_timestamp_nanos_since_epoch`"
411 )]] void
412 set_time_nanos(std::string_view timeline_name, int64_t nanos) const {
413 set_time_duration_nanos(timeline_name, nanos);
414 }
415
416 /// Stops logging to the specified timeline for subsequent log calls.
417 ///
418 /// The timeline is still there, but will not be updated with any new data.
419 ///
420 /// No-op if the timeline doesn't exist.
421 ///
422 /// @see set_time_sequence, set_time_seconds, set_time, reset_time
423 void disable_timeline(std::string_view timeline_name) const;
424
425 /// Clears out the current time of the recording, for the current calling thread.
426 ///
427 /// Used for all subsequent logging performed from this same thread, until the next call
428 /// to one of the time setting methods.
429 ///
430 /// For example: `rec.reset_time()`.
431 /// @see set_time_sequence, set_time_seconds, set_time_nanos, disable_timeline
432 void reset_time() const;
433
434 /// @}
435
436 // -----------------------------------------------------------------------------------------
437 /// \name Sending & logging data.
438 /// @{
439
440 /// Logs one or more archetype and/or component batches.
441 ///
442 /// This is the main entry point for logging data to rerun. It can be used to log anything
443 /// that implements the `AsComponents<T>` trait.
444 ///
445 /// When logging data, you must always provide an [entity_path](https://www.rerun.io/docs/concepts/logging-and-ingestion/entity-path)
446 /// for identifying the data. Note that paths prefixed with "__" are considered reserved for use by the Rerun SDK
447 /// itself and should not be used for logging user data. This is where Rerun will log additional information
448 /// such as properties and warnings.
449 ///
450 /// The most common way to log is with one of the rerun archetypes, all of which implement the `AsComponents` trait.
451 ///
452 /// For example, to log two 3D points:
453 /// ```
454 /// rec.log("my/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}}));
455 /// ```
456 ///
457 /// The `log` function can flexibly accept an arbitrary number of additional objects which will
458 /// be merged into the first entity, for instance:
459 /// ```
460 /// // Log three points with arrows sticking out of them:
461 /// rec.log(
462 /// "my/points",
463 /// rerun::Points3D({{0.2f, 0.5f, 0.3f}, {0.9f, 1.2f, 0.1f}, {1.0f, 4.2f, 0.3f}})
464 /// .with_radii({0.1, 0.2, 0.3}),
465 /// rerun::Arrows3D::from_vectors({{0.3f, 2.1f, 0.2f}, {0.9f, -1.1, 2.3f}, {-0.4f, 0.5f, 2.9f}})
466 /// );
467 /// ```
468 ///
469 /// Any failures that may are handled with `Error::handle`.
470 ///
471 /// \param entity_path Path to the entity in the space hierarchy.
472 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
473 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
474 /// You can implement `AsComponents` for your own types as well
475 ///
476 /// @see try_log, log_static, try_log_with_static
477 template <typename... Ts>
478 void log(std::string_view entity_path, const Ts&... as_components) const {
479 if (!is_enabled()) {
480 return;
481 }
482 try_log_with_static(entity_path, false, as_components...).handle();
483 }
484
485 /// Logs one or more archetype and/or component batches as static data.
486 ///
487 /// Like `log` but logs the data as static:
488 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
489 /// any temporal data of the same type.
490 ///
491 /// Failures are handled with `Error::handle`.
492 ///
493 /// \param entity_path Path to the entity in the space hierarchy.
494 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
495 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
496 /// You can implement `AsComponents` for your own types as well
497 ///
498 /// @see log, try_log_static, try_log_with_static
499 template <typename... Ts>
500 void log_static(std::string_view entity_path, const Ts&... as_components) const {
501 if (!is_enabled()) {
502 return;
503 }
504 try_log_with_static(entity_path, true, as_components...).handle();
505 }
506
507 /// Logs one or more archetype and/or component batches.
508 ///
509 /// See `log` for more information.
510 /// Unlike `log` this method returns an error if an error occurs.
511 ///
512 /// \param entity_path Path to the entity in the space hierarchy.
513 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
514 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
515 /// You can implement `AsComponents` for your own types as well
516 ///
517 /// @see log, try_log_static, try_log_with_static
518 template <typename... Ts>
519 Error try_log(std::string_view entity_path, const Ts&... as_components) const {
520 if (!is_enabled()) {
521 return Error::ok();
522 }
523 return try_log_with_static(entity_path, false, as_components...);
524 }
525
526 /// Logs one or more archetype and/or component batches as static data, returning an error.
527 ///
528 /// See `log`/`log_static` for more information.
529 /// Unlike `log_static` this method returns if an error occurs.
530 ///
531 /// \param entity_path Path to the entity in the space hierarchy.
532 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
533 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
534 /// You can implement `AsComponents` for your own types as well
535 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
536 ///
537 /// @see log_static, try_log, try_log_with_static
538 template <typename... Ts>
539 Error try_log_static(std::string_view entity_path, const Ts&... as_components) const {
540 if (!is_enabled()) {
541 return Error::ok();
542 }
543 return try_log_with_static(entity_path, true, as_components...);
544 }
545
546 /// Logs one or more archetype and/or component batches optionally static, returning an error.
547 ///
548 /// See `log`/`log_static` for more information.
549 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
550 ///
551 /// \param entity_path Path to the entity in the space hierarchy.
552 /// \param static_ If true, the logged components will be static.
553 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
554 /// any temporal data of the same type.
555 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
556 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
557 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
558 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
559 /// You can implement `AsComponents` for your own types as well
560 ///
561 /// @see log, try_log, log_static, try_log_static
562 template <typename... Ts>
563 void log_with_static(std::string_view entity_path, bool static_, const Ts&... as_components)
564 const {
565 try_log_with_static(entity_path, static_, as_components...).handle();
566 }
567
568 /// Logs one or more archetype and/or component batches optionally static, returning an error.
569 ///
570 /// See `log`/`log_static` for more information.
571 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
572 ///
573 /// \param entity_path Path to the entity in the space hierarchy.
574 /// \param static_ If true, the logged components will be static.
575 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
576 /// any temporal data of the same type.
577 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
578 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
579 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
580 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
581 /// You can implement `AsComponents` for your own types as well
582 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
583 ///
584 /// @see log, try_log, log_static, try_log_static
585 template <typename... Ts>
587 std::string_view entity_path, bool static_, const Ts&... as_components
588 ) const {
589 if (!is_enabled()) {
590 return Error::ok();
591 }
592 std::vector<ComponentBatch> serialized_columns;
593 Error err;
594 (
595 [&] {
596 if (err.is_err()) {
597 return;
598 }
599
600 const Result<Collection<ComponentBatch>> serialization_result =
601 AsComponents<Ts>().as_batches(as_components);
602 if (serialization_result.is_err()) {
603 err = serialization_result.error;
604 return;
605 }
606
607 if (serialized_columns.empty()) {
608 // Fast path for the first batch (which is usually the only one!)
609 serialized_columns = std::move(serialization_result.value).to_vector();
610 } else {
611 serialized_columns.insert(
612 serialized_columns.end(),
613 std::make_move_iterator(serialization_result.value.begin()),
614 std::make_move_iterator(serialization_result.value.end())
615 );
616 }
617 }(),
618 ...
619 );
620 RR_RETURN_NOT_OK(err);
621
622 return try_log_serialized_batches(entity_path, static_, std::move(serialized_columns));
623 }
624
625 /// Logs several serialized batches batches, returning an error on failure.
626 ///
627 /// This is a more low-level API than `log`/`log_static\ and requires you to already serialize the data
628 /// ahead of time.
629 ///
630 /// \param entity_path Path to the entity in the space hierarchy.
631 /// \param static_ If true, the logged components will be static.
632 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
633 /// any temporal data of the same type.
634 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
635 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
636 /// \param batches The serialized batches to log.
637 ///
638 /// \see `log`, `try_log`, `log_static`, `try_log_static`, `try_log_with_static`
640 std::string_view entity_path, bool static_, std::vector<ComponentBatch> batches
641 ) const;
642
643 /// Bottom level API that logs raw data cells to the recording stream.
644 ///
645 /// In order to use this you need to pass serialized Arrow data cells.
646 ///
647 /// \param entity_path Path to the entity in the space hierarchy.
648 /// \param num_data_cells Number of data cells passed in.
649 /// \param data_cells The data cells to log.
650 /// \param inject_time
651 /// If set to `true`, the row's timestamp data will be overridden using the recording
652 /// streams internal clock.
653 ///
654 /// \see `try_log_serialized_batches`
656 std::string_view entity_path, size_t num_data_cells, const ComponentBatch* data_cells,
657 bool inject_time
658 ) const;
659
660 /// Logs the file at the given `path` using all `Importer`s available.
661 ///
662 /// A single `path` might be handled by more than one importer.
663 ///
664 /// This method blocks until either at least one `Importer` starts streaming data in
665 /// or all of them fail.
666 ///
667 /// See <https://www.rerun.io/docs/concepts/logging-and-ingestion/importers/overview?speculative-link> for more information.
668 ///
669 /// \param filepath Path to the file to be logged.
670 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
671 /// \param static_ If true, the logged components will be static.
672 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
673 /// any temporal data of the same type.
674 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
675 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
676 ///
677 /// \see `try_log_file_from_path`
679 const std::filesystem::path& filepath,
680 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
681 ) const {
682 try_log_file_from_path(filepath, entity_path_prefix, static_).handle();
683 }
684
685 /// Logs the file at the given `path` using all `Importer`s available.
686 ///
687 /// A single `path` might be handled by more than one importer.
688 ///
689 /// This method blocks until either at least one `Importer` starts streaming data in
690 /// or all of them fail.
691 ///
692 /// See <https://www.rerun.io/docs/concepts/logging-and-ingestion/importers/overview?speculative-link> for more information.
693 ///
694 /// \param filepath Path to the file to be logged.
695 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
696 /// \param static_ If true, the logged components will be static.
697 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
698 /// any temporal data of the same type.
699 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
700 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
701 ///
702 /// \see `log_file_from_path`
704 const std::filesystem::path& filepath,
705 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
706 ) const;
707
708 /// Logs the given `contents` using all `Importer`s available.
709 ///
710 /// A single `path` might be handled by more than one importer.
711 ///
712 /// This method blocks until either at least one `Importer` starts streaming data in
713 /// or all of them fail.
714 ///
715 /// See <https://www.rerun.io/docs/concepts/logging-and-ingestion/importers/overview?speculative-link> for more information.
716 ///
717 /// \param filepath Path to the file that the `contents` belong to.
718 /// \param contents Contents to be logged.
719 /// \param contents_size Size in bytes of the `contents`.
720 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
721 /// \param static_ If true, the logged components will be static.
722 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
723 /// any temporal data of the same type.
724 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
725 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
726 ///
727 /// \see `try_log_file_from_contents`
729 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
730 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
731 ) const {
733 filepath,
734 contents,
735 contents_size,
736 entity_path_prefix,
737 static_
738 )
739 .handle();
740 }
741
742 /// Logs the given `contents` using all `Importer`s available.
743 ///
744 /// A single `path` might be handled by more than one importer.
745 ///
746 /// This method blocks until either at least one `Importer` starts streaming data in
747 /// or all of them fail.
748 ///
749 /// See <https://www.rerun.io/docs/concepts/logging-and-ingestion/importers/overview?speculative-link> for more information.
750 ///
751 /// \param filepath Path to the file that the `contents` belong to.
752 /// \param contents Contents to be logged.
753 /// \param contents_size Size in bytes of the `contents`.
754 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
755 /// \param static_ If true, the logged components will be static.
756 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
757 /// any temporal data of the same type.
758 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
759 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
760 ///
761 /// \see `log_file_from_contents`
763 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
764 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
765 ) const;
766
767 /// Directly log a columns of data to Rerun.
768 ///
769 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
770 ///
771 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
772 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
773 /// The lengths of all of these columns must match, and all
774 /// data that shares the same index across the different columns will act as a single logical row,
775 /// equivalent to a single call to `RecordingStream::log`.
776 ///
777 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
778 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
779 ///
780 /// Any failures that may occur during serialization are handled with `Error::handle`.
781 ///
782 /// \param entity_path Path to the entity in the space hierarchy.
783 /// \param time_columns The time columns to send.
784 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
785 /// \see `try_send_columns`
786 template <typename... Ts>
788 std::string_view entity_path, Collection<TimeColumn> time_columns,
789 Ts... component_columns // NOLINT
790 ) const {
791 try_send_columns(entity_path, time_columns, component_columns...).handle();
792 }
793
794 /// Directly log a columns of data to Rerun.
795 ///
796 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
797 ///
798 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
799 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
800 /// The lengths of all of these columns must match, and all
801 /// data that shares the same index across the different columns will act as a single logical row,
802 /// equivalent to a single call to `RecordingStream::log`.
803 ///
804 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
805 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
806 ///
807 /// \param entity_path Path to the entity in the space hierarchy.
808 /// \param time_columns The time columns to send.
809 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
810 /// \see `send_columns`
811 template <typename... Ts>
813 std::string_view entity_path, Collection<TimeColumn> time_columns,
814 Ts... component_columns // NOLINT
815 ) const {
816 if constexpr (sizeof...(Ts) == 1) {
817 // Directly forward if this is only a single element,
818 // skipping collection of component column vector.
819 return try_send_columns(
820 entity_path,
821 std::move(time_columns),
822 Collection(std::forward<Ts...>(component_columns...))
823 );
824 }
825
826 std::vector<ComponentColumn> flat_column_list;
827 (
828 [&] {
829 static_assert(
830 std::is_same_v<std::remove_cv_t<Ts>, ComponentColumn> ||
831 std::is_constructible_v<Collection<ComponentColumn>, Ts>,
832 "Ts must be ComponentColumn or a collection thereof"
833 );
834
835 push_back_columns(flat_column_list, std::move(component_columns));
836 }(),
837 ...
838 );
839 return try_send_columns(
840 entity_path,
841 std::move(time_columns),
842 // Need to create collection explicitly, otherwise this becomes a recursive call.
843 Collection<ComponentColumn>(std::move(flat_column_list))
844 );
845 }
846
847 /// Directly log a columns of data to Rerun.
848 ///
849 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
850 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
851 /// The lengths of all of these columns must match, and all
852 /// data that shares the same index across the different columns will act as a single logical row,
853 /// equivalent to a single call to `RecordingStream::log`.
854 ///
855 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
856 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
857 ///
858 /// Any failures that may occur during serialization are handled with `Error::handle`.
859 ///
860 /// \param entity_path Path to the entity in the space hierarchy.
861 /// \param time_columns The time columns to send.
862 /// \param component_columns The columns of components to send.
863 /// \see `try_send_columns`
865 std::string_view entity_path, Collection<TimeColumn> time_columns,
866 Collection<ComponentColumn> component_columns
867 ) const {
868 try_send_columns(entity_path, time_columns, component_columns).handle();
869 }
870
871 /// Directly log a columns of data to Rerun.
872 ///
873 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
874 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
875 /// The lengths of all of these columns must match, and all
876 /// data that shares the same index across the different columns will act as a single logical row,
877 /// equivalent to a single call to `RecordingStream::log`.
878 ///
879 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
880 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
881 ///
882 /// \param entity_path Path to the entity in the space hierarchy.
883 /// \param time_columns The time columns to send.
884 /// \param component_columns The columns of components to send.
885 /// \see `send_columns`
887 std::string_view entity_path, Collection<TimeColumn> time_columns,
888 Collection<ComponentColumn> component_columns
889 ) const;
890
891 /// Set a property of a recording.
892 ///
893 /// Any failures that may occur during serialization are handled with `Error::handle`.
894 ///
895 /// \param name The name of the property.
896 /// \param values The values of the property.
897 /// \see `try_send_property`
898 template <typename... Ts>
899 void send_property(std::string_view name, const Ts&... values) const {
900 try_send_property(name, values...).handle();
901 }
902
903 /// Set a property of a recording.
904 ///
905 /// Any failures that may occur during serialization are handled with `Error::handle`.
906 ///
907 /// \param name The name of the property.
908 /// \param values The values of the property.
909 /// \see `set_property`
910 template <typename... Ts>
911 Error try_send_property(std::string_view name, const Ts&... values) const {
912 return try_log_static(
913 this->PROPERTIES_ENTITY_PATH + std::string(name),
914 values... // NOLINT
915 );
916 }
917
918 /// Set the name of a recording.
919 ///
920 /// Any failures that may occur during serialization are handled with `Error::handle`.
921 ///
922 /// \param name The name of the recording.
923 /// \see `try_send_recording_name`
924 void send_recording_name(std::string_view name) const {
926 }
927
928 /// Set the name of a recording.
929 ///
930 /// \param name The name of the recording.
931 /// \see `send_recording_name`
932 Error try_send_recording_name(std::string_view name) const;
933
934 /// Set the start time of a recording.
935 ///
936 /// Any failures that may occur during serialization are handled with `Error::handle`.
937 ///
938 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
939 /// \see `try_send_recording_start_time`
940 void send_recording_start_time_nanos(int64_t nanos) const {
942 }
943
944 /// Set the start time of a recording.
945 ///
946 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
947 /// \see `set_name`
949
950 /// @}
951
952 private:
953 Error try_set_sinks(const LogSink* sinks, uint32_t num_sinks) const;
954
955 // Utility function to implement `try_send_columns` variadic template.
956 static void push_back_columns(
957 std::vector<ComponentColumn>& component_columns, Collection<ComponentColumn> new_columns
958 ) {
959 for (const auto& new_column : new_columns) {
960 component_columns.emplace_back(std::move(new_column));
961 }
962 }
963
964 static void push_back_columns(
965 std::vector<ComponentColumn>& component_columns, ComponentColumn new_column
966 ) {
967 component_columns.emplace_back(std::move(new_column));
968 }
969
970 RecordingStream(uint32_t id, StoreKind store_kind);
971
972 uint32_t _id;
973 StoreKind _store_kind;
974 bool _enabled;
975 };
976} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
void handle() const
Handle this error based on the set log handler.
bool is_err() const
Returns true if the code is not Ok.
Definition error.hpp:139
static Error ok()
Creates a new error set to ok.
Definition error.hpp:124
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:73
Error try_log_with_static(std::string_view entity_path, bool static_, const Ts &... as_components) const
Logs one or more archetype and/or component batches optionally static, returning an error.
Definition recording_stream.hpp:586
Error try_send_property(std::string_view name, const Ts &... values) const
Set a property of a recording.
Definition recording_stream.hpp:911
Error try_send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Collection< ComponentColumn > component_columns) const
Directly log a columns of data to Rerun.
void log_file_from_path(const std::filesystem::path &filepath, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the file at the given path using all Importers available.
Definition recording_stream.hpp:678
bool is_enabled() const
Returns whether the recording stream is enabled.
Definition recording_stream.hpp:117
void set_time_duration_nanos(std::string_view timeline_name, int64_t nanos) const
Set the index value of the given timeline as a duration in nanoseconds, for the current calling threa...
void send_property(std::string_view name, const Ts &... values) const
Set a property of a recording.
Definition recording_stream.hpp:899
Error try_send_recording_start_time_nanos(int64_t nanos) const
Set the start time of a recording.
Error try_log(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches.
Definition recording_stream.hpp:519
void disable_timeline(std::string_view timeline_name) const
Stops logging to the specified timeline for subsequent log calls.
void reset_time() const
Clears out the current time of the recording, for the current calling thread.
Error to_stdout() const
Stream all log-data to standard output.
void send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Collection< ComponentColumn > component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:864
Error try_log_file_from_path(const std::filesystem::path &filepath, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the file at the given path using all Importers available.
Error save(std::string_view path) const
Stream all log-data to a given .rrd file.
Error try_log_static(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches as static data, returning an error.
Definition recording_stream.hpp:539
StoreKind kind() const
Returns the store kind as passed during construction.
Definition recording_stream.hpp:109
Error flush_blocking(float timeout_sec=std::numeric_limits< float >::infinity()) const
Initiates a flush the batching pipeline and waits for it to propagate.
Error spawn(const SpawnOptions &options={}, std::chrono::duration< TRep, TPeriod > flush_timeout=std::chrono::seconds(2)) const
Definition recording_stream.hpp:203
Error try_log_data_row(std::string_view entity_path, size_t num_data_cells, const ComponentBatch *data_cells, bool inject_time) const
Bottom level API that logs raw data cells to the recording stream.
void log_file_from_contents(const std::filesystem::path &filepath, const std::byte *contents, size_t contents_size, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the given contents using all Importers available.
Definition recording_stream.hpp:728
void set_time_timestamp_secs_since_epoch(std::string_view timeline_name, double seconds) const
Set the index value of the given timeline as seconds since Unix Epoch (1970), for the current calling...
Definition recording_stream.hpp:333
void set_time_duration_secs(std::string_view timeline_name, double secs) const
Set the index value of the given timeline as a duration in seconds, for the current calling thread.
Definition recording_stream.hpp:289
void set_time_duration(std::string_view timeline_name, std::chrono::duration< TRep, TPeriod > duration) const
Set the index value of the given timeline as a duration, for the current calling thread.
Definition recording_stream.hpp:273
Error set_sinks(const Ts &... sinks) const
Stream data to multiple sinks.
Definition recording_stream.hpp:160
void set_time_nanos(std::string_view timeline_name, int64_t nanos) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:412
void set_time(std::string_view timeline_name, std::chrono::duration< TRep, TPeriod > time) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:379
Result< std::string > serve_grpc(std::string_view bind_ip="0.0.0.0", uint16_t port=9876, std::string_view server_memory_limit="1GiB", PlaybackBehavior playback_behavior=PlaybackBehavior::OldestFirst, std::vector< std::string > cors_allow_origins={}) const
Swaps the underlying sink for a gRPC server sink pre-configured to listen on rerun+http://{bind_ip}:{...
void send_recording_start_time_nanos(int64_t nanos) const
Set the start time of a recording.
Definition recording_stream.hpp:940
void log_with_static(std::string_view entity_path, bool static_, const Ts &... as_components) const
Logs one or more archetype and/or component batches optionally static, returning an error.
Definition recording_stream.hpp:563
static RecordingStream & current(StoreKind store_kind=StoreKind::Recording)
Retrieves the most appropriate globally available recording stream for the given kind.
RecordingStream(std::string_view app_id, std::string_view recording_id=std::string_view(), StoreKind store_kind=StoreKind::Recording)
Creates a new recording stream to log to.
void log(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches.
Definition recording_stream.hpp:478
void set_thread_local() const
Replaces the currently active recording for this stream's store kind in the thread-local scope with t...
Error try_send_recording_name(std::string_view name) const
Set the name of a recording.
Error try_log_serialized_batches(std::string_view entity_path, bool static_, std::vector< ComponentBatch > batches) const
Logs several serialized batches batches, returning an error on failure.
Error connect_grpc(std::string_view url="rerun+http://127.0.0.1:9876/proxy") const
Connect to a remote Rerun Viewer on the given URL.
void set_time(std::string_view timeline_name, std::chrono::time_point< TClock > time) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:363
Error spawn(const SpawnOptions &options={}) const
Spawns a new Rerun Viewer process from an executable available in PATH, then connects to it over gRPC...
void set_time_seconds(std::string_view timeline_name, double seconds) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:396
void set_time_timestamp_nanos_since_epoch(std::string_view timeline_name, int64_t nanos) const
Set the index value of the given timeline as nanoseconds since Unix Epoch (1970), for the current cal...
void send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Ts... component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:787
Error try_log_file_from_contents(const std::filesystem::path &filepath, const std::byte *contents, size_t contents_size, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the given contents using all Importers available.
void send_recording_name(std::string_view name) const
Set the name of a recording.
Definition recording_stream.hpp:924
void set_global() const
Replaces the currently active recording for this stream's store kind in the global scope with this on...
void set_time_timestamp(std::string_view timeline_name, std::chrono::time_point< TClock > timestamp) const
Set the index value of the given timeline as a timestamp, for the current calling thread.
Definition recording_stream.hpp:314
void set_time_sequence(std::string_view timeline_name, int64_t sequence_nr) const
Set the index value of the given timeline as a sequence number, for the current calling thread.
Error try_send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Ts... component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:812
void log_static(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches as static data.
Definition recording_stream.hpp:500
A class for representing either a usable value, or an error.
Definition result.hpp:14
bool is_err() const
Returns true if error is not set to rerun::ErrorCode::Ok, implying that no value is contained,...
Definition result.hpp:44
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
PlaybackBehavior
What happens when a client connects to a gRPC server?
Definition recording_stream.hpp:28
@ OldestFirst
Start playing back all the old data first, and only after start sending anything that happened since.
@ NewestFirst
Prioritize the newest arriving messages, replaying the history later, starting with the newest.
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
Arrow-encoded data of a column of components.
Definition component_column.hpp:20
A sink for log messages.
Definition log_sink.hpp:38
Options to control the behavior of spawn.
Definition spawn_options.hpp:17