Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C++ codegen of structs and unions (#2707)
* Part of #2647 ### What This declares all C++ types and their fields. A matching `#include` list is also included. The resulting C++ builds. Test it yourself with `cargo codegen && ./examples/cpp/minimal/build_and_run.sh` Sum-types are implemented via "tagged unions" approach, basically an emulation of how Rust does it under the hood. see #2647 for details. ### Done: * struct declarations * enum declarations * enum destructors * enum move semantics * enum static constructors * Implicit constructors for enums * Implicit constructor for single-fields structs (e.g. `Vec3D`) ### Still left to do: * Arrow-serialization * Helper functions for building archetypes (needs design) ### Things I think we should punt on: * Copy constructors * Copy assignment operator ### 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/2707) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2707) - [Docs preview](https://rerun.io/preview/pr%3Aemilk%2Fcodegen-cpp-struct/docs) - [Examples preview](https://rerun.io/preview/pr%3Aemilk%2Fcodegen-cpp-struct/examples)
- Loading branch information
d77d5ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.25
.batch_points_arrow/encode_log_msg
89184
ns/iter (± 188
)49631
ns/iter (± 154
)1.80
This comment was automatically generated by workflow using github-action-benchmark.