Skip to content

Commit

Permalink
arrow2-convert migration 2: non-serde blueprint types (#3855)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teh-cmc authored Oct 16, 2023
1 parent cca2069 commit 6d8c4a9
Show file tree
Hide file tree
Showing 42 changed files with 835 additions and 257 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions crates/re_arrow_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ name = "arrow2"
harness = false
required-features = ["testing"]

[[bench]]
name = "arrow2_convert"
harness = false
required-features = ["testing"]

[[bench]]
name = "vectors"
harness = false
145 changes: 0 additions & 145 deletions crates/re_arrow_store/benches/arrow2_convert.rs

This file was deleted.

4 changes: 4 additions & 0 deletions crates/re_types/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/re_types/definitions/rerun/archetypes.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ include "./archetypes/view_coordinates.fbs";

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

// NOTE: The current file is the entrypoint for codegen, and so we need to import
// the blueprint types here otherwise nothing will.
include "./blueprint.fbs";

namespace rerun.archetypes;
2 changes: 2 additions & 0 deletions crates/re_types/definitions/rerun/blueprint.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include "./blueprint/auto_space_views.fbs";
include "./blueprint/panel_view.fbs";
22 changes: 22 additions & 0 deletions crates/re_types/definitions/rerun/blueprint/auto_space_views.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.blueprint;

// ---

/// A flag indicating space views should be automatically populated.
///
/// Unstable. Used for the ongoing blueprint experimentations.
struct AutoSpaceViews (
"attr.arrow.transparent",
"attr.rust.derive": "Copy, Default",
"attr.rust.repr": "transparent",
"attr.rust.tuple_struct"
) {
enabled: bool (order: 100);
}
19 changes: 19 additions & 0 deletions crates/re_types/definitions/rerun/blueprint/panel_view.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.blueprint;

// ---

/// The state of the panels.
///
/// Unstable. Used for the ongoing blueprint experimentations.
struct PanelView (
"attr.rust.derive": "Copy"
) {
is_expanded: bool (order: 100);
}
129 changes: 129 additions & 0 deletions crates/re_types/src/blueprint/auto_space_views.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions crates/re_types/src/blueprint/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6d8c4a9

Please sign in to comment.