Skip to content

Commit 6d8c4a9

Browse files
authored
arrow2-convert migration 2: non-serde blueprint types (#3855)
This PR introduces `ObjectKind::Blueprint` into our codegen framework. `Blueprint` objects are as expressive as `Datatype` objects (i.e. they don't have the artificial limitations that we impose on `Component` objects), but still implement the `Component` trait. Blueprint objects live in a separate module so as not to pollute LSP/docs/etc. This allows us to replace existing `arrow2_convert`-based blueprint types with fbs definitions instead. This PR does not cover `SerdeField` shenanigans, that comes next.
1 parent cca2069 commit 6d8c4a9

File tree

42 files changed

+835
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+835
-257
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/re_arrow_store/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ name = "arrow2"
123123
harness = false
124124
required-features = ["testing"]
125125

126-
[[bench]]
127-
name = "arrow2_convert"
128-
harness = false
129-
required-features = ["testing"]
130-
131126
[[bench]]
132127
name = "vectors"
133128
harness = false

crates/re_arrow_store/benches/arrow2_convert.rs

Lines changed: 0 additions & 145 deletions
This file was deleted.

crates/re_types/.gitattributes

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/re_types/definitions/rerun/archetypes.fbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ include "./archetypes/view_coordinates.fbs";
2424

2525
include "./testing/archetypes/fuzzy.fbs";
2626

27+
// NOTE: The current file is the entrypoint for codegen, and so we need to import
28+
// the blueprint types here otherwise nothing will.
29+
include "./blueprint.fbs";
30+
2731
namespace rerun.archetypes;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include "./blueprint/auto_space_views.fbs";
2+
include "./blueprint/panel_view.fbs";
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
include "arrow/attributes.fbs";
2+
include "python/attributes.fbs";
3+
include "rust/attributes.fbs";
4+
5+
include "rerun/datatypes.fbs";
6+
include "rerun/attributes.fbs";
7+
8+
namespace rerun.blueprint;
9+
10+
// ---
11+
12+
/// A flag indicating space views should be automatically populated.
13+
///
14+
/// Unstable. Used for the ongoing blueprint experimentations.
15+
struct AutoSpaceViews (
16+
"attr.arrow.transparent",
17+
"attr.rust.derive": "Copy, Default",
18+
"attr.rust.repr": "transparent",
19+
"attr.rust.tuple_struct"
20+
) {
21+
enabled: bool (order: 100);
22+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include "arrow/attributes.fbs";
2+
include "python/attributes.fbs";
3+
include "rust/attributes.fbs";
4+
5+
include "rerun/datatypes.fbs";
6+
include "rerun/attributes.fbs";
7+
8+
namespace rerun.blueprint;
9+
10+
// ---
11+
12+
/// The state of the panels.
13+
///
14+
/// Unstable. Used for the ongoing blueprint experimentations.
15+
struct PanelView (
16+
"attr.rust.derive": "Copy"
17+
) {
18+
is_expanded: bool (order: 100);
19+
}

crates/re_types/src/blueprint/auto_space_views.rs

Lines changed: 129 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/re_types/src/blueprint/mod.rs

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)