Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ basic Archetype & Component logging #2874

Merged
merged 11 commits into from
Jul 31, 2023

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 🌊 C++ API C or C++ logging API labels Jul 31, 2023
@teh-cmc teh-cmc self-requested a review July 31, 2023 13:29
crates/re_types_builder/src/codegen/cpp/mod.rs Outdated Show resolved Hide resolved
@Wumpf Wumpf merged commit bf27efd into main Jul 31, 2023
16 checks passed
@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
🌊 C++ API C or C++ logging API codegen/idl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants