Implement custom visualizations (Rust only)
Embedding custom UI in the Viewer embedding-custom-ui-in-the-viewer
In the above screenshot you see the example extend_viewer_ui
, which contains the Rerun Viewer to the left and a custom panel to the right. In this example the panel contains a hierarchial text view of the loaded data.
How to build it how-to-build-it
The Rerun Viewer is defined by the crate re_viewer
. It uses the popular Rust GUI library egui
(written by our CTO) and its framework eframe
. To extend the UI you need to create your own eframe
application and embed re_viewer
inside of it. You can then use egui
to add custom panels and windows.
The best way to get started is by reading the source code of the extend_viewer_ui
example.
Custom views classes custom-views-classes
Above screenshot shows the custom_view
example.
This example demonstrates how to add a fully custom View class to Rerun on startup.
Views that are added this way have access to the exact same interfaces as all other Views,
meaning that any of the built-in Views serves can serve as an additional example on how to implement Views.
⚠️ Note that the interface for adding Views are very far from stable. Expect code implementing custom Views to break with every release of Rerun.
Future work
We plan to also support embedding your own GUI widgets inside existing views.