Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Dec 14, 2023
1 parent f68b0b6 commit f1f95bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
add_subdirectory(clock)
add_subdirectory(custom_collection_adapter)
add_subdirectory(dna)
add_subdirectory(shared_recording)
add_subdirectory(minimal)
add_subdirectory(shared_recording)
add_subdirectory(spawn_viewer)
add_subdirectory(stdio)

add_custom_target(examples)

add_dependencies(examples example_clock)
add_dependencies(examples example_custom_collection_adapter)
add_dependencies(examples example_dna)
add_dependencies(examples example_shared_recording)
add_dependencies(examples example_minimal)
add_dependencies(examples example_shared_recording)
add_dependencies(examples example_spawn_viewer)
add_dependencies(examples example_stdio)
5 changes: 3 additions & 2 deletions examples/cpp/stdio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Demonstrates how to log data to standard output with the Rerun SDK, and then vis

To build it from a checkout of the repository (requires a Rust toolchain):
```bash
just cpp-build-examples
echo 'hello from stdin!' | ./build/debug/examples/cpp/stdio/example_stdio | rerun -
cmake .
cmake --build . --target example_stdio
echo 'hello from stdin!' | ./examples/cpp/stdio/example_stdio | rerun -
```
1 change: 1 addition & 0 deletions rerun_cpp/src/rerun/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace rerun {
_CategoryRecordingStream = 0x0000'0100,
RecordingStreamCreationFailure,
RecordingStreamSaveFailure,
RecordingStreamStdoutFailure,
RecordingStreamSpawnFailure,

// Arrow data processing errors.
Expand Down
4 changes: 4 additions & 0 deletions rerun_cpp/src/rerun/recording_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ namespace rerun {
/// default back to `buffered` mode, in order not to break the user's terminal.
///
/// This function returns immediately.
//
// NOTE: This should be called `stdout` like in other SDK, but turns out that `stdout` is a
// macro when compiling with msvc [1].
// [1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/stdin-stdout-stderr?view=msvc-170
Error to_stdout() const;

/// Initiates a flush the batching pipeline and waits for it to propagate.
Expand Down

0 comments on commit f1f95bc

Please sign in to comment.