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

Eagerly serialized, partially updatable 2D & 3D line strips #8650

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Jan 10, 2025

This PR makes LineStrips2D and LineStrips3D eagerly serialized and partially update-able.

This demonstrates how to migrate an archetype in the simple case.

Copy link

github-actions bot commented Jan 10, 2025

Web viewer failed to build.

| Result | Commit | Link | Manifest |
| ------ | ------- | ----- |
| ❌ | | https://rerun.io/viewer/pr/8650 | +nightly +main |

Note: This comment is updated whenever you push a commit.

@teh-cmc teh-cmc added 🦀 Rust API Rust logging API do-not-merge Do not merge this PR 🍏 primitives Relating to Rerun primitives exclude from changelog PRs with this won't show up in CHANGELOG.md labels Jan 10, 2025
@teh-cmc teh-cmc marked this pull request as ready for review January 10, 2025 16:27
@teh-cmc teh-cmc force-pushed the cmc/eager_partial_7_linestrips branch from 19b3032 to e067f32 Compare January 10, 2025 16:28
@rerun-io rerun-io deleted a comment from github-actions bot Jan 10, 2025
@teh-cmc
Copy link
Member Author

teh-cmc commented Jan 10, 2025

@rerun-bot full-check

Copy link

Started a full build: https://github.com/rerun-io/rerun/actions/runs/12713445477

@emilk emilk self-requested a review January 10, 2025 18:01
components::LineStrip2D::from_iter([[0., 3.], [1., 4.], [2., 2.], [3., 4.], [4., 2.], [5., 4.], [6., 3.]]), //
]
.serialized()
.map(|batch| batch.with_descriptor_override(LineStrips2D::descriptor_strips())),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, we need to do this manually in the tests now… oh well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we only need to do it for that specific test because that's the thing I'm testing for. In any other case I sure hope people will use the builder methods!

@teh-cmc teh-cmc force-pushed the cmc/eager_partial_6_and_snippets_for_all branch from 55800f3 to ba709f9 Compare January 13, 2025 08:44
Base automatically changed from cmc/eager_partial_6_and_snippets_for_all to main January 13, 2025 08:45
@teh-cmc teh-cmc force-pushed the cmc/eager_partial_7_linestrips branch from e067f32 to e30aa4b Compare January 13, 2025 08:47
@teh-cmc teh-cmc removed the do-not-merge Do not merge this PR label Jan 13, 2025
@teh-cmc teh-cmc merged commit e26d858 into main Jan 13, 2025
28 of 29 checks passed
@teh-cmc teh-cmc deleted the cmc/eager_partial_7_linestrips branch January 13, 2025 08:49
teh-cmc added a commit that referenced this pull request Jan 14, 2025
…+ partial (#8666)

Introduces a new attribute that, when paired with an eager archetype,
will also generate a native companion type with back-and-forth
conversion methods.

This is especially useful for blueprint archetypes (although there are
definitely non-blueprint examples too), which are heavily used all
across the viewer, and would be very painful to use otherwise.

```rust
/// Whether we should generate an extra Rust object comprised of native Rust types.
///
/// The generated object will have the name of the archetype, prefixed by `Native`,
/// e.g. `NativePoints3D`.
///
/// Applies only to *eager* archetypes. No-op otherwise.
attribute "attr.rust.archetype_native";
```

With this, we now should have all the tools required to port every
remaining archetype (both blueprint and data).

* Part of #8650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🍏 primitives Relating to Rerun primitives 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants