Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forward Rust (de-)serialization of transparent datatypes (#6793)
### What Remove lots of redundant serialization code by forwarding transparent components to its datatypes: * forward `from_arrow_opt` for fully transparent types * forward `from_arrow` for fully transparent types * this requires us generating it for `datatypes`! * the forwarding uses `bytemuck` when possible. Should be possible in more places, but the constraints are complicated so this isn't fully automated and depends on types being manually marked as `bytemuck::Pod` * would be really nice though if we could automate that. Almost everything we're dealing with _should_ be pod 🤔 * forward `to_arrow_opt` for fully transparent types * forward `arrow_datatype` for fully transparent types @ reviewer: There's only two non-generated files: * `crates/re_types_builder/src/codegen/rust/api.rs`: https://github.com/rerun-io/rerun/pull/6793/files#diff-4eb7d4aa8c72b1987ed00d1ad9c61782b9dd55d8b96a50a44156388fea8c67f9 * `crates/re_types_builder/src/codegen/rust/deserializer.rs`: https://github.com/rerun-io/rerun/pull/6793/files#diff-91844032ca93ef2e29de6a660674273bfd6e836b26ae58c83fef09dcd8db1076 Everything else is generated via those changes. You'll want to have a sampling of both datatypes & components. ### 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 the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6793?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6793?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/6793) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information