-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arrow2-convert
migration 4: support serde-based types in codegen (#…
…3902) This introduces the `rust.attr.serde_type` attribute, allowing you to use any `serde`-compatible Rust types in our IDL. ``` table ViewportLayout ( "attr.rust.derive": "PartialEq", "attr.rust.override_crate": "re_viewport" ) { space_view_keys: [ubyte] (order: 100, "attr.rust.serde_type": "std::collections::BTreeSet<re_viewer_context::SpaceViewId>"); tree: [ubyte] (order: 101, "attr.rust.serde_type": "egui_tiles::Tree<re_viewer_context::SpaceViewId>"); auto_layout: bool (order: 102); } ``` This unblocks further blueprint experimentations, and is the last blocker to sunset `arrow2-convert`. - `SpaceViewComponent`, `SpaceViewMaximized` & `ViewportLayout` are now all implemented that way. - `re_viewport` is now free of `arrow2-convert`. --- `arrow2-convert` migration PR series: - #3853 - #3855 - #3897 - #3902 - #3917
- Loading branch information
Showing
161 changed files
with
4,855 additions
and
2,689 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
include "./blueprint/auto_space_views.fbs"; | ||
include "./blueprint/panel_view.fbs"; | ||
include "./blueprint/space_view_component.fbs"; | ||
include "./blueprint/space_view_maximized.fbs"; | ||
include "./blueprint/viewport_layout.fbs"; |
20 changes: 20 additions & 0 deletions
20
crates/re_types/definitions/rerun/blueprint/space_view_component.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint; | ||
|
||
// --- | ||
|
||
/// A view of a space. | ||
/// | ||
/// Unstable. Used for the ongoing blueprint experimentations. | ||
table SpaceViewComponent ( | ||
"attr.rust.derive_only": "Clone", | ||
"attr.rust.override_crate": "re_viewport" | ||
) { | ||
space_view: [ubyte] (order: 100, "attr.rust.serde_type": "crate::SpaceViewBlueprint"); | ||
} |
24 changes: 24 additions & 0 deletions
24
crates/re_types/definitions/rerun/blueprint/space_view_maximized.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint; | ||
|
||
// --- | ||
|
||
/// Whether a space view is maximized. | ||
/// | ||
/// Unstable. Used for the ongoing blueprint experimentations. | ||
table SpaceViewMaximized ( | ||
"attr.arrow.transparent", | ||
"attr.rust.derive": "Copy, Default, PartialEq, Eq", | ||
"attr.rust.override_crate": "re_viewport", | ||
"attr.rust.repr": "transparent", | ||
"attr.rust.tuple_struct" | ||
) { | ||
id: [ubyte] (order: 100, nullable, "attr.rust.serde_type": "re_viewer_context::SpaceViewId"); | ||
} | ||
|
27 changes: 27 additions & 0 deletions
27
crates/re_types/definitions/rerun/blueprint/viewport_layout.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint; | ||
|
||
// --- | ||
|
||
/// A view of a space. | ||
/// | ||
/// Unstable. Used for the ongoing blueprint experimentations. | ||
table ViewportLayout ( | ||
"attr.rust.derive": "PartialEq", | ||
"attr.rust.override_crate": "re_viewport" | ||
) { | ||
/// space_view_keys | ||
space_view_keys: [ubyte] (order: 100, "attr.rust.serde_type": "std::collections::BTreeSet<re_viewer_context::SpaceViewId>"); | ||
|
||
/// tree | ||
tree: [ubyte] (order: 101, "attr.rust.serde_type": "egui_tiles::Tree<re_viewer_context::SpaceViewId>"); | ||
|
||
/// auto_layout | ||
auto_layout: bool (order: 102); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.