Skip to content

Conversation

@Wumpf
Copy link
Member

@Wumpf Wumpf commented Jul 31, 2023

What

Introduces APIs for component and archetype logging as well as the necessary methods in codegen to do so. A very basic example is included in main.cpp.
Largely unrelated to the rest:

  • Makes C++ tagged union types copy-able
  • to_arrow_datatype constructs/allocates the datatype lazily exactly once (using C++'s crazy local static variable guarantees)

Commit by commit review possible.

image

Next steps:

  • Add roundtrip tests
  • Add C++ to ci (roundtrip, linting, etc.)
  • Add codegen custom code injection
  • Improve API usability in varous places, including Don't leak arrow headers into Rerun C++ API headers #2873
  • add other tests
  • serialize unions
  • serialize datatypes nested in unions, structs and lists
  • more testing & roundtripping

Checklist

@Wumpf Wumpf added codegen/idl sdk-cpp C/C++ API specific labels Jul 31, 2023
@teh-cmc teh-cmc self-requested a review July 31, 2023 13:29
@Wumpf Wumpf merged commit bf27efd into main Jul 31, 2023
@Wumpf Wumpf deleted the andreas/cpp-codegen/archetype-builder-and-logging branch July 31, 2023 15:22
Wumpf added a commit that referenced this pull request Aug 2, 2023
…t APIs & introduce C++ SDK tests (#2890)

* Part of #2516
(SDK! Not codegen! :))
* Next in the cpp series after #2874

### What

Adds a test dependency to the
[Catch2](https://github.com/catchorg/Catch2/) testing framework in order
to start testing all the new RecordingStream features added here.

C++ tests can be conveniently run via
`./rerun_cpp/build_and_run_tests.sh` now!

For quick api overview start with the `rerun.h` and `recording_stream.h`
headers.

Fixes a range of compiler warnings as a consequence of improving some of
the CMake setup, more to do there!
Adds lots more documentation to RecordingStream as well.


Next steps:
* Add C++ to ci (linting, running this test suite)
* Add roundtrip tests
*  Add codegen custom code injection
    * Improve API usability in varous places, including 
* #2873
* add other tests
* serialize unions
* serialize datatypes nested in unions, structs and lists
* more testing & roundtripping

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2890) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2890)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp-api%2Fbetter-recording-stream/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp-api%2Fbetter-recording-stream/examples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen/idl sdk-cpp C/C++ API specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants