├── .cargo └── config.toml ├── .dockerignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── annoyance_report.md │ ├── bug_report.md │ ├── feature_request.md │ ├── other.md │ └── question.md ├── pull_request_template.md └── workflows │ ├── labels.yml │ ├── misc.yml │ ├── python.yml │ ├── rust.yml │ └── toml.yml ├── .gitignore ├── .isort.cfg ├── .mypy.ini ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── ARCHITECTURE.md ├── BUILD.md ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CODE_STYLE.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── Cranky.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── RELEASES.md ├── _typos.toml ├── bacon.toml ├── ci_docker ├── Dockerfile └── publish.sh ├── clippy.toml ├── crates ├── re_analytics │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── examples │ │ └── end_to_end.rs │ └── src │ │ ├── cli.rs │ │ ├── config_native.rs │ │ ├── config_web.rs │ │ ├── lib.rs │ │ ├── pipeline_native.rs │ │ ├── pipeline_web.rs │ │ ├── sink_native.rs │ │ └── sink_web.rs ├── re_arrow_store │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ ├── arrow2.rs │ │ ├── arrow2_convert.rs │ │ ├── data_store.rs │ │ └── vectors.rs │ ├── examples │ │ ├── dump_dataframe.rs │ │ ├── latest_component.rs │ │ ├── latest_components.rs │ │ └── range_components.rs │ ├── src │ │ ├── arrow_util.rs │ │ ├── lib.rs │ │ ├── polars_util.rs │ │ ├── store.rs │ │ ├── store_arrow.rs │ │ ├── store_dump.rs │ │ ├── store_format.rs │ │ ├── store_gc.rs │ │ ├── store_polars.rs │ │ ├── store_read.rs │ │ ├── store_sanity.rs │ │ ├── store_stats.rs │ │ ├── store_write.rs │ │ └── test_util.rs │ └── tests │ │ ├── correctness.rs │ │ ├── data_store.rs │ │ ├── dump.rs │ │ └── internals.rs ├── re_build_build_info │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── re_build_info │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── build_info.rs │ │ ├── crate_version.rs │ │ └── lib.rs ├── re_build_web_viewer │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── lib.rs │ │ └── main.rs ├── re_data_store │ ├── Cargo.toml │ ├── README.md │ ├── examples │ │ └── memory_usage.rs │ └── src │ │ ├── editable_auto_value.rs │ │ ├── entity_properties.rs │ │ ├── entity_tree.rs │ │ ├── instance_path.rs │ │ ├── lib.rs │ │ └── log_db.rs ├── re_error │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── re_format │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── arrow.rs │ │ └── lib.rs ├── re_int_histogram │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ └── int_histogram_benchmark.rs │ ├── src │ │ ├── lib.rs │ │ └── tree.rs │ └── tests │ │ ├── memory_test.rs │ │ └── snapshots │ │ ├── memory_test__Int64Histogram.snap │ │ └── memory_test__btree.snap ├── re_log │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── channel_logger.rs │ │ ├── lib.rs │ │ ├── multi_logger.rs │ │ ├── setup.rs │ │ └── web_logger.rs ├── re_log_encoding │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ └── msg_encode_benchmark.rs │ └── src │ │ ├── decoder.rs │ │ ├── encoder.rs │ │ ├── file_sink.rs │ │ ├── lib.rs │ │ └── stream_rrd_from_http.rs ├── re_log_types │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── arrow_msg.rs │ │ ├── component.rs │ │ ├── component_types │ │ ├── arrow.rs │ │ ├── arrow_convert_shims.rs │ │ ├── bbox.rs │ │ ├── class_id.rs │ │ ├── color.rs │ │ ├── context.rs │ │ ├── coordinates.rs │ │ ├── imu.rs │ │ ├── instance_key.rs │ │ ├── keypoint_id.rs │ │ ├── label.rs │ │ ├── linestrip.rs │ │ ├── mat.rs │ │ ├── mesh3d.rs │ │ ├── mod.rs │ │ ├── node_graph.rs │ │ ├── point.rs │ │ ├── quaternion.rs │ │ ├── radius.rs │ │ ├── rect.rs │ │ ├── scalar.rs │ │ ├── size.rs │ │ ├── tensor.rs │ │ ├── text_entry.rs │ │ ├── transform.rs │ │ ├── vec.rs │ │ └── xlink_stats.rs │ │ ├── data.rs │ │ ├── data_cell.rs │ │ ├── data_row.rs │ │ ├── data_table.rs │ │ ├── datagen.rs │ │ ├── hash.rs │ │ ├── index.rs │ │ ├── lib.rs │ │ ├── path │ │ ├── component_name.rs │ │ ├── component_path.rs │ │ ├── entity_path.rs │ │ ├── entity_path_impl.rs │ │ ├── mod.rs │ │ └── parse_path.rs │ │ ├── size_bytes.rs │ │ ├── time.rs │ │ ├── time_point │ │ ├── mod.rs │ │ ├── time_int.rs │ │ └── timeline.rs │ │ ├── time_range.rs │ │ └── time_real.rs ├── re_memory │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── accounting_allocator.rs │ │ ├── allocation_tracker.rs │ │ ├── backtrace_native.rs │ │ ├── backtrace_web.rs │ │ ├── lib.rs │ │ ├── memory_history.rs │ │ ├── memory_limit.rs │ │ ├── memory_use.rs │ │ ├── ram_warner.rs │ │ └── util.rs ├── re_query │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ └── query_benchmark.rs │ ├── examples │ │ └── range.rs │ ├── src │ │ ├── dataframe_util.rs │ │ ├── entity_view.rs │ │ ├── lib.rs │ │ ├── query.rs │ │ ├── range.rs │ │ ├── util.rs │ │ └── visit.rs │ └── tests │ │ ├── common │ │ └── mod.rs │ │ ├── query_tests.rs │ │ ├── range_tests.rs │ │ ├── type_tests.rs │ │ └── visit_tests.rs ├── re_renderer │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── examples │ │ ├── 2d.rs │ │ ├── README.md │ │ ├── assets │ │ │ └── rerun.obj.zip │ │ ├── depth_cloud.rs │ │ ├── framework.rs │ │ ├── multiview.rs │ │ ├── outlines.rs │ │ ├── picking.rs │ │ └── rerun.obj.zip │ ├── shader │ │ ├── colormap.wgsl │ │ ├── composite.wgsl │ │ ├── copy_texture.wgsl │ │ ├── debug_overlay.wgsl │ │ ├── decodings.wgsl │ │ ├── depth_cloud.wgsl │ │ ├── generic_skybox.wgsl │ │ ├── global_bindings.wgsl │ │ ├── instanced_mesh.wgsl │ │ ├── lines.wgsl │ │ ├── mesh_vertex.wgsl │ │ ├── outlines │ │ │ ├── jumpflooding_init.wgsl │ │ │ ├── jumpflooding_init_msaa.wgsl │ │ │ ├── jumpflooding_init_shared.wgsl │ │ │ └── jumpflooding_step.wgsl │ │ ├── point_cloud.wgsl │ │ ├── rectangle.wgsl │ │ ├── rectangle_fs.wgsl │ │ ├── rectangle_vs.wgsl │ │ ├── screen_triangle.wgsl │ │ ├── screen_triangle_vertex.wgsl │ │ ├── test_triangle.wgsl │ │ ├── types.wgsl │ │ └── utils │ │ │ ├── camera.wgsl │ │ │ ├── depth_offset.wgsl │ │ │ ├── encoding.wgsl │ │ │ ├── flags.wgsl │ │ │ ├── quaternion.wgsl │ │ │ ├── size.wgsl │ │ │ ├── sphere_quad.wgsl │ │ │ └── srgb.wgsl │ └── src │ │ ├── allocator │ │ ├── cpu_write_gpu_read_belt.rs │ │ ├── gpu_readback_belt.rs │ │ ├── mod.rs │ │ └── uniform_buffer_fill.rs │ │ ├── color.rs │ │ ├── colormap.rs │ │ ├── config.rs │ │ ├── context.rs │ │ ├── debug_label.rs │ │ ├── depth_offset.rs │ │ ├── draw_phases │ │ ├── mod.rs │ │ ├── outlines.rs │ │ ├── picking_layer.rs │ │ └── screenshot.rs │ │ ├── error_tracker.rs │ │ ├── file_resolver.rs │ │ ├── file_server.rs │ │ ├── file_system.rs │ │ ├── global_bindings.rs │ │ ├── importer │ │ ├── gltf.rs │ │ ├── mod.rs │ │ └── obj.rs │ │ ├── lib.rs │ │ ├── line_strip_builder.rs │ │ ├── mesh.rs │ │ ├── point_cloud_builder.rs │ │ ├── rect.rs │ │ ├── renderer │ │ ├── compositor.rs │ │ ├── debug_overlay.rs │ │ ├── depth_cloud.rs │ │ ├── generic_skybox.rs │ │ ├── lines.rs │ │ ├── mesh_renderer.rs │ │ ├── mod.rs │ │ ├── point_cloud.rs │ │ ├── rectangles.rs │ │ └── test_triangle.rs │ │ ├── resource_managers │ │ ├── mesh_manager.rs │ │ ├── mod.rs │ │ ├── resource_manager.rs │ │ └── texture_manager.rs │ │ ├── size.rs │ │ ├── texture_info.rs │ │ ├── view_builder.rs │ │ ├── wgpu_buffer_types.rs │ │ ├── wgpu_resources │ │ ├── bind_group_layout_pool.rs │ │ ├── bind_group_pool.rs │ │ ├── buffer_pool.rs │ │ ├── dynamic_resource_pool.rs │ │ ├── mod.rs │ │ ├── pipeline_layout_pool.rs │ │ ├── render_pipeline_pool.rs │ │ ├── resource.rs │ │ ├── sampler_pool.rs │ │ ├── shader_module_pool.rs │ │ ├── static_resource_pool.rs │ │ └── texture_pool.rs │ │ └── workspace_shaders.rs ├── re_sdk │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ └── src │ │ ├── demo_util.rs │ │ ├── global.rs │ │ ├── lib.rs │ │ ├── log_sink.rs │ │ ├── msg_sender.rs │ │ └── session.rs ├── re_sdk_comms │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── buffered_client.rs │ │ ├── lib.rs │ │ ├── server.rs │ │ └── tcp_client.rs ├── re_smart_channel │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── re_string_interner │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── re_tensor_ops │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── dimension_mapping.rs │ │ └── lib.rs │ └── tests │ │ └── tensor_tests.rs ├── re_tuid │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ └── bench_tuid.rs │ └── src │ │ └── lib.rs ├── re_ui │ ├── Cargo.toml │ ├── README.md │ ├── data │ │ ├── Inter-Medium.otf │ │ ├── Inter-README.txt │ │ ├── OFL.txt │ │ ├── design_tokens.json │ │ ├── icons │ │ │ ├── add.png │ │ │ ├── app_icon_mac.png │ │ │ ├── app_icon_windows.png │ │ │ ├── arrow_left.png │ │ │ ├── arrow_right.png │ │ │ ├── bottom_panel_toggle.png │ │ │ ├── close.png │ │ │ ├── container.png │ │ │ ├── copy.png │ │ │ ├── depthai_icon.png │ │ │ ├── follow.png │ │ │ ├── gear.png │ │ │ ├── invisible.png │ │ │ ├── left_panel_toggle.png │ │ │ ├── loop.png │ │ │ ├── maximize.png │ │ │ ├── minimize.png │ │ │ ├── oak4_d.png │ │ │ ├── pause.png │ │ │ ├── play.png │ │ │ ├── remove.png │ │ │ ├── rerun_menu.png │ │ │ ├── reset.png │ │ │ ├── right_panel_toggle.png │ │ │ ├── spaceview_3d.png │ │ │ ├── spaceview_chart.png │ │ │ ├── spaceview_histogram.png │ │ │ ├── spaceview_raw.png │ │ │ ├── spaceview_scatterplot.png │ │ │ ├── spaceview_tensor.png │ │ │ ├── spaceview_text.png │ │ │ └── visible.png │ │ ├── logo_dark_mode.png │ │ └── logo_light_mode.png │ ├── examples │ │ └── re_ui_example.rs │ └── src │ │ ├── command.rs │ │ ├── command_palette.rs │ │ ├── design_tokens.rs │ │ ├── egui_helpers.rs │ │ ├── icons.rs │ │ ├── lib.rs │ │ ├── static_image_cache.rs │ │ ├── toasts.rs │ │ └── toggle_switch.rs ├── re_viewer │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── pipeline.json │ └── src │ │ ├── app.rs │ │ ├── app_icon.rs │ │ ├── depthai │ │ ├── api.rs │ │ ├── dependency_installer.rs │ │ ├── depthai.rs │ │ ├── mod.rs │ │ └── ws.rs │ │ ├── env_vars.rs │ │ ├── gpu_bridge │ │ ├── mod.rs │ │ └── tensor_to_gpu.rs │ │ ├── lib.rs │ │ ├── math.rs │ │ ├── misc │ │ ├── app_options.rs │ │ ├── caches │ │ │ ├── mesh_cache.rs │ │ │ ├── mod.rs │ │ │ └── tensor_decode_cache.rs │ │ ├── clipboard.rs │ │ ├── format_time.rs │ │ ├── instance_hash_conversions.rs │ │ ├── item.rs │ │ ├── mesh_loader.rs │ │ ├── mod.rs │ │ ├── profiler.rs │ │ ├── queries.rs │ │ ├── selection_state.rs │ │ ├── space_info.rs │ │ ├── time_control.rs │ │ ├── time_control_ui.rs │ │ ├── transform_cache.rs │ │ └── viewer_context.rs │ │ ├── native.rs │ │ ├── remote_viewer_app.rs │ │ ├── ui │ │ ├── annotations.rs │ │ ├── auto_layout.rs │ │ ├── blueprint.rs │ │ ├── bottom_panel │ │ │ └── mod.rs │ │ ├── data_blueprint.rs │ │ ├── data_ui │ │ │ ├── annotation_context.rs │ │ │ ├── component.rs │ │ │ ├── component_path.rs │ │ │ ├── component_ui_registry.rs │ │ │ ├── data.rs │ │ │ ├── entity_path.rs │ │ │ ├── image.rs │ │ │ ├── instance_path.rs │ │ │ ├── log_msg.rs │ │ │ └── mod.rs │ │ ├── device_settings_panel.rs │ │ ├── editable_auto_value.rs │ │ ├── memory_panel.rs │ │ ├── mod.rs │ │ ├── scene.rs │ │ ├── selection_history.rs │ │ ├── selection_history_ui.rs │ │ ├── selection_panel.rs │ │ ├── space_view.rs │ │ ├── space_view_entity_picker.rs │ │ ├── space_view_heuristics.rs │ │ ├── stats_panel.rs │ │ ├── time_panel │ │ │ ├── data_density_graph.rs │ │ │ ├── mod.rs │ │ │ ├── paint_ticks.rs │ │ │ ├── time_axis.rs │ │ │ ├── time_ranges_ui.rs │ │ │ └── time_selection_ui.rs │ │ ├── view_bar_chart │ │ │ ├── mod.rs │ │ │ ├── scene.rs │ │ │ └── ui.rs │ │ ├── view_category.rs │ │ ├── view_node_graph │ │ │ ├── mod.rs │ │ │ ├── scene.rs │ │ │ └── ui.rs │ │ ├── view_spatial │ │ │ ├── eye.rs │ │ │ ├── mod.rs │ │ │ ├── scene │ │ │ │ ├── mod.rs │ │ │ │ ├── picking.rs │ │ │ │ ├── primitives.rs │ │ │ │ └── scene_part │ │ │ │ │ ├── arrows3d.rs │ │ │ │ │ ├── boxes2d.rs │ │ │ │ │ ├── boxes3d.rs │ │ │ │ │ ├── cameras.rs │ │ │ │ │ ├── images.rs │ │ │ │ │ ├── lines2d.rs │ │ │ │ │ ├── lines3d.rs │ │ │ │ │ ├── meshes.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── points2d.rs │ │ │ │ │ └── points3d.rs │ │ │ ├── space_camera_3d.rs │ │ │ ├── ui.rs │ │ │ ├── ui_2d.rs │ │ │ ├── ui_3d.rs │ │ │ └── ui_renderer_bridge.rs │ │ ├── view_tensor │ │ │ ├── mod.rs │ │ │ ├── scene.rs │ │ │ ├── tensor_dimension_mapper.rs │ │ │ ├── tensor_slice_to_gpu.rs │ │ │ └── ui.rs │ │ ├── view_text │ │ │ ├── mod.rs │ │ │ ├── scene.rs │ │ │ └── ui.rs │ │ ├── view_time_series │ │ │ ├── mod.rs │ │ │ ├── scene.rs │ │ │ └── ui.rs │ │ └── viewport.rs │ │ ├── viewer_analytics.rs │ │ └── web.rs ├── re_web_viewer_server │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── web_viewer ├── re_ws_comms │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── client.rs │ │ ├── lib.rs │ │ └── server.rs └── rerun │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ └── src │ ├── clap.rs │ ├── crash_handler.rs │ ├── lib.rs │ ├── main.rs │ ├── native_viewer.rs │ ├── run.rs │ └── web_viewer.rs ├── deny.toml ├── design ├── batching.md ├── blueprint_store.md └── component_datatypes.md ├── examples ├── .gitignore ├── .rerun_examples ├── README.md ├── python │ ├── README.md │ ├── __init__.py │ ├── api_demo │ │ ├── main.py │ │ └── requirements.txt │ ├── arkitscenes │ │ ├── .gitignore │ │ ├── download_dataset.py │ │ ├── main.py │ │ └── requirements.txt │ ├── car │ │ ├── main.py │ │ └── requirements.txt │ ├── clock │ │ ├── main.py │ │ └── requirements.txt │ ├── colmap │ │ ├── .gitignore │ │ ├── main.py │ │ ├── read_write_model.py │ │ └── requirements.txt │ ├── deep_sdf │ │ ├── .gitignore │ │ ├── download_dataset.py │ │ ├── main.py │ │ └── requirements.txt │ ├── dicom │ │ ├── .gitignore │ │ ├── main.py │ │ └── requirements.txt │ ├── dna │ │ ├── main.py │ │ └── requirements.txt │ ├── minimal │ │ ├── main.py │ │ └── requirements.txt │ ├── mp_pose │ │ ├── .gitignore │ │ ├── main.py │ │ └── requirements.txt │ ├── multiprocessing │ │ ├── main.py │ │ └── requirements.txt │ ├── multithreading │ │ ├── main.py │ │ └── requirements.txt │ ├── notebook │ │ ├── .gitignore │ │ ├── README.md │ │ ├── cube.ipynb │ │ └── requirements.txt │ ├── nyud │ │ ├── .gitignore │ │ ├── main.py │ │ └── requirements.txt │ ├── objectron │ │ ├── download_dataset.py │ │ ├── main.py │ │ ├── proto │ │ │ ├── LICENSE.txt │ │ │ ├── __init__.py │ │ │ ├── a_r_capture_metadata.proto │ │ │ ├── annotation_data.proto │ │ │ ├── object.proto │ │ │ └── objectron │ │ │ │ ├── __init__.py │ │ │ │ └── proto.py │ │ └── requirements.txt │ ├── opencv_canny │ │ ├── main.py │ │ └── requirements.txt │ ├── plots │ │ ├── main.py │ │ └── requirements.txt │ ├── raw_mesh │ │ ├── download_dataset.py │ │ ├── main.py │ │ └── requirements.txt │ ├── requirements.txt │ ├── ros │ │ ├── README.md │ │ ├── main.py │ │ ├── requirements.txt │ │ └── rerun_urdf.py │ ├── segment_anything │ │ ├── .gitignore │ │ ├── main.py │ │ └── requirements.txt │ ├── stable_diffusion │ │ ├── .gitignore │ │ ├── huggingface_pipeline.py │ │ ├── main.py │ │ └── requirements.txt │ ├── text_logging │ │ ├── main.py │ │ └── requirements.txt │ └── tracking_hf_opencv │ │ ├── .gitignore │ │ ├── main.py │ │ ├── panoptic_coco_categories.json │ │ └── requirements.txt └── rust │ ├── README.md │ ├── api_demo │ ├── Cargo.toml │ └── src │ │ └── main.rs │ ├── dna │ ├── Cargo.toml │ └── src │ │ └── main.rs │ ├── minimal │ ├── Cargo.toml │ └── src │ │ └── main.rs │ ├── minimal_options │ ├── Cargo.toml │ └── src │ │ └── main.rs │ ├── objectron │ ├── Cargo.toml │ ├── build.rs │ ├── proto │ └── src │ │ ├── main.rs │ │ └── objectron.rs │ └── raw_mesh │ ├── Cargo.toml │ └── src │ └── main.rs ├── justfile ├── nonworking.log ├── rerun_py ├── .gitignore ├── Cargo.toml ├── README.md ├── build.rs ├── depthai_viewer │ ├── __init__.py │ ├── __main__.py │ ├── _backend │ │ ├── .gitignore │ │ ├── README.md │ │ ├── __init__.py │ │ ├── classification_labels.py │ │ ├── config_api.py │ │ ├── depth.py │ │ ├── device.py │ │ ├── device_configuration.py │ │ ├── device_defaults │ │ │ ├── oak_d_generic_default.py │ │ │ ├── oak_d_lr_default.py │ │ │ ├── oak_d_sr_default.py │ │ │ ├── oak_d_sr_poe_default.py │ │ │ └── oak_t_default.py │ │ ├── main.py │ │ ├── messages.py │ │ ├── packet_handler.py │ │ ├── py.typed │ │ ├── store.py │ │ └── topic.py │ ├── color_conversion.py │ ├── components │ │ ├── __init__.py │ │ ├── annotation.py │ │ ├── arrow.py │ │ ├── box.py │ │ ├── color.py │ │ ├── imu.py │ │ ├── instance.py │ │ ├── label.py │ │ ├── linestrip.py │ │ ├── point.py │ │ ├── quaternion.py │ │ ├── radius.py │ │ ├── rect2d.py │ │ ├── scalar.py │ │ ├── tensor.py │ │ ├── text_entry.py │ │ ├── vec.py │ │ └── xlink_stats.py │ ├── install_requirements.py │ ├── log │ │ ├── __init__.py │ │ ├── annotation.py │ │ ├── arrow.py │ │ ├── bounding_box.py │ │ ├── camera.py │ │ ├── error_utils.py │ │ ├── extension_components.py │ │ ├── file.py │ │ ├── image.py │ │ ├── imu.py │ │ ├── lines.py │ │ ├── log_decorator.py │ │ ├── mesh.py │ │ ├── pipeline_graph.py │ │ ├── points.py │ │ ├── rects.py │ │ ├── scalar.py │ │ ├── tensor.py │ │ ├── text.py │ │ ├── text_internal.py │ │ ├── transform.py │ │ └── xlink_stats.py │ ├── py.typed │ ├── recording.py │ ├── requirements.txt │ └── script_helpers.py ├── docs │ ├── SUMMARY.txt │ ├── css │ │ └── mkdocstrings.css │ ├── gen_common_index.py │ ├── gen_package_index.py │ ├── package │ │ └── index.md │ ├── templates │ │ └── python │ │ │ └── material │ │ │ ├── class.html │ │ │ └── function.html │ └── writing_docs.md ├── mkdocs.yml ├── pyproject.toml ├── requirements-build.txt ├── requirements-doc.txt ├── requirements-lint.txt ├── src │ ├── arrow.rs │ ├── lib.rs │ ├── python_bridge.rs │ └── python_session.rs └── tests │ └── unit │ ├── api_tests.py │ └── test_color_conversion.py ├── run_wasm ├── Cargo.toml ├── README.md └── src │ └── main.rs ├── rust-toolchain ├── scripts ├── cargo_deny.sh ├── check.sh ├── check_large_files.sh ├── check_large_files_allow_list.txt ├── check_shader.py ├── clippy_wasm.sh ├── clippy_wasm │ └── clippy.toml ├── fix_py_lint.sh ├── generate_changelog.py ├── generate_pr_summary.py ├── generate_prerelease_pip_index.py ├── lint.py ├── publish_crates.sh ├── run_python_e2e_test.py ├── setup.sh ├── setup_dev.sh ├── setup_web.sh ├── start_server.sh ├── templates │ ├── pip_index.html │ └── pr_results_summary.html └── version_util.py ├── taplo.toml ├── tests ├── README.md └── rust │ └── test_image_memory │ ├── Cargo.toml │ └── src │ └── main.rs ├── web_viewer ├── .gitignore ├── README.md ├── favicon.svg ├── index.html ├── index_bundled.html ├── manifest.json └── sw.js └── working.log /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [alias] 2 | # To easily run examples on the web, see https://github.com/rukai/cargo-run-wasm. 3 | # Temporary solution while we wait for our own xtasks! 4 | run-wasm = "run --release --package run_wasm --" 5 | 6 | [env] 7 | # Some of our build.rs files only run if this is set, 8 | # so that we don't run them on cargo publish or on users machines. 9 | IS_IN_RERUN_WORKSPACE = "yes" 10 | 11 | 12 | # [target.x86_64-unknown-linux-gnu] 13 | # linker = "clang" 14 | # rustflags = [ 15 | # "-C", 16 | # "link-arg=-fuse-ld=/usr/bin/mold", 17 | # "-C", 18 | # "split-debuginfo=unpacked", 19 | # ] 20 | # web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses, 21 | # https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html 22 | # as well as WebGPU apis. 23 | # https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html 24 | [target.wasm32-unknown-unknown] 25 | rustflags = ["--cfg=web_sys_unstable_apis"] 26 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | **/*.so 3 | examples/ 4 | target 5 | target* 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.zip -text diff 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/annoyance_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Annoyance report 3 | about: Create a report to help us make Rerun easier to use 4 | title: '' 5 | labels: 😤 annoying, 👀 needs triage 6 | assignees: '' 7 | 8 | --- 9 | 15 | 16 | 19 | 20 | **Describe the annoyance** 21 | 22 | 23 | **To Reproduce** 24 | Steps to reproduce the behavior: 25 | 1. 26 | 2. 27 | 3. 28 | 4. 29 | 30 | **Expected behavior** 31 | 32 | 33 | **Your goals** 34 | 35 | 36 | **Screenshots** 37 | 38 | 39 | **Desktop (please complete the following information):** 40 | - OS: 41 | 42 | **Additional context** 43 | 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 🪳 bug, 👀 needs triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | 13 | 14 | **Describe the bug** 15 | 16 | 17 | **To Reproduce** 18 | Steps to reproduce the behavior: 19 | 1. 20 | 2. 21 | 3. 22 | 4. 23 | 24 | **Expected behavior** 25 | 26 | 27 | **Screenshots** 28 | 29 | 30 | **Backtrace** 31 | 32 | 33 | **Desktop (please complete the following information):** 34 | - OS: 35 | 36 | **Additional context** 37 | 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement, 👀 needs triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | 13 | 14 | 15 | **Is your feature request related to a problem? Please describe.** 16 | 17 | 18 | **Describe the solution you'd like** 19 | 20 | 21 | **Describe alternatives you've considered** 22 | 23 | 24 | **Additional context** 25 | 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: For issues that are neither bugs or feature requests 4 | title: '' 5 | labels: other, 👀 needs triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | If you are asking a question, use [the Rerun Discord server](https://discord.gg/PXtCgFBSmH) instead. 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: For questions please use the Rerun Discord 4 | title: '' 5 | labels: 👀 needs triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | If you are asking a question, use [the Rerun Discord server](https://discord.gg/PXtCgFBSmH) instead. 11 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | ### What 14 | 15 | ### Checklist 16 | 17 | - [ ] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) 18 | - [ ] I've included a screenshot or gif (if applicable) 19 | 20 | 21 | 22 | PR Build Summary: {{ pr-build-summary }} 23 | -------------------------------------------------------------------------------- /.github/workflows/labels.yml: -------------------------------------------------------------------------------- 1 | # https://github.com/marketplace/actions/require-labels 2 | # Check for existence of labels 3 | # See all our labels at https://github.com/rerun-io/rerun/issues/labels 4 | 5 | name: Pull Request Labels 6 | 7 | on: 8 | pull_request: 9 | types: 10 | - opened 11 | - synchronize 12 | - reopened 13 | - labeled 14 | - unlabeled 15 | 16 | jobs: 17 | label: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Check for a "do-not-merge" label 21 | uses: mheap/github-action-required-labels@v3 22 | with: 23 | mode: exactly 24 | count: 0 25 | labels: "do-not-merge" 26 | 27 | - name: Require at least one label 28 | uses: mheap/github-action-required-labels@v3 29 | with: 30 | mode: minimum 31 | count: 1 32 | labels: "📊 analytics, 🪳 bug, 🧑‍💻 dev experience, 📖 documentation, examples, 📉 performance, 🐍 python API, ⛃ re_datastore, 📺 re_viewer, 🔺 re_renderer, ⛴ release, 🦀 rust SDK, 🔨 testing, ui, 🕸️ web" 33 | -------------------------------------------------------------------------------- /.github/workflows/misc.yml: -------------------------------------------------------------------------------- 1 | name: CI (Misc) 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | push: 7 | branches: 8 | - "main" 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Cancel previous CI jobs on the same branch 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | misc-rerun-lints: 16 | name: Rerun lints 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v3 20 | 21 | - name: Set up Python 22 | uses: actions/setup-python@v4 23 | with: 24 | python-version: "3.8" 25 | 26 | - name: Rerun lints 27 | run: | 28 | ./scripts/lint.py 29 | 30 | - name: Check for too large files 31 | run: | 32 | ./scripts/check_large_files.sh 33 | -------------------------------------------------------------------------------- /.github/workflows/toml.yml: -------------------------------------------------------------------------------- 1 | name: CI (TOML) 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - "main" 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Cancel previous CI jobs on the same branch 11 | cancel-in-progress: true 12 | 13 | jobs: 14 | toml-lints: 15 | name: Lint TOML files 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v3 19 | 20 | - uses: actions-rs/toolchain@v1 21 | with: 22 | profile: minimal 23 | toolchain: 1.80.0 24 | override: true 25 | 26 | - name: Set up cargo cache 27 | uses: Swatinem/rust-cache@v2 28 | with: 29 | # See: https://github.com/rerun-io/rerun/pull/497 30 | env-vars: CARGO CC CFLAGS CXX CMAKE RUST CACHE_KEY 31 | # Don't update the cache -- it will be updated by the lint job 32 | # TODO(jleibs): this job will likely run before rust.yml updates 33 | # the cache. Better cross-job sequencing would be nice here 34 | save-if: false 35 | 36 | - name: Install taplo-cli 37 | uses: baptiste0928/cargo-install@v1 38 | with: 39 | crate: taplo-cli 40 | 41 | - name: Taplo check 42 | run: | 43 | taplo fmt --check 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Rust compile target directory: 4 | **/target 5 | **/target_ra 6 | **/target_wasm 7 | 8 | # Python virtual environment: 9 | /venv 10 | 11 | # Python build artifacts: 12 | __pycache__ 13 | *.pyc 14 | *.so 15 | 16 | .gdb_history 17 | perf.data* 18 | 19 | **/dataset/ 20 | 21 | # Screenshots from samples etc. 22 | screenshot*.png 23 | venv* 24 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | profile=black 3 | -------------------------------------------------------------------------------- /.mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | files = rerun_py/depthai_viewer, rerun_py/tests, examples/python 3 | exclude = examples/python/objectron/proto|examples/python/ros 4 | namespace_packages = True 5 | show_error_codes = True 6 | strict = True 7 | enable_error_code = redundant-expr, truthy-bool, ignore-without-code 8 | plugins = numpy.typing.mypy_plugin 9 | ignore_missing_imports = True 10 | 11 | # Don't lint demo helpers. 12 | [mypy-rerun_demo.*] 13 | ignore_errors = True 14 | 15 | # Allow DNA example to call demo helpers. 16 | [mypy-python.dna.main] 17 | disallow_untyped_calls = False 18 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "charliermarsh.ruff", 6 | "github.vscode-github-actions", 7 | "ms-python.python", 8 | "ms-vsliveshare.vsliveshare", 9 | "polymeilex.wgsl", 10 | "rust-lang.rust-analyzer", 11 | "serayuzgur.crates", 12 | "streetsidesoftware.code-spell-checker", 13 | "tamasfe.even-better-toml", 14 | "vadimcn.vscode-lldb", 15 | "wayou.vscode-todo-highlight", 16 | "webfreak.debug", 17 | "zxh404.vscode-proto3", 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 Rerun Technologies AB 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /_typos.toml: -------------------------------------------------------------------------------- 1 | # https://github.com/crate-ci/typos 2 | # install: cargo install typos-cli 3 | # run: typos 4 | 5 | [default.extend-words] 6 | lod = "lod" # level-of-detail 7 | teh = "teh" # part of @teh-cmc 8 | -------------------------------------------------------------------------------- /ci_docker/publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | VERSION=0.6 # Bump on each new version. Remember to update the version in the Dockerfile too. 5 | 6 | # The build needs to run from top of repo to access the requirements.txt 7 | cd `git rev-parse --show-toplevel` 8 | 9 | # Pull :latest so we have the correct cache 10 | docker pull rerunio/ci_docker 11 | 12 | # Build the image 13 | docker build -t ci_docker -f ci_docker/Dockerfile . 14 | # This is necessary to build on mac, but is doing something weird with the Cache 15 | # TODO(jleibs): Make this all work portably with caching 16 | # docker buildx build --platform=linux/amd64 -t ci_docker -f ci_docker/Dockerfile . 17 | 18 | # Tag latest and version 19 | docker tag ci_docker rerunio/ci_docker 20 | docker tag ci_docker rerunio/ci_docker:$VERSION 21 | 22 | # Push the images back up 23 | docker push rerunio/ci_docker 24 | docker push rerunio/ci_docker:$VERSION 25 | -------------------------------------------------------------------------------- /crates/re_analytics/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_analytics" 3 | authors.workspace = true 4 | description = "Rerun's analytics SDK" 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dependencies] 20 | # Internal dependencies: 21 | re_build_info.workspace = true 22 | re_log.workspace = true 23 | 24 | # External dependencies: 25 | anyhow.workspace = true 26 | crossbeam = "0.8" 27 | once_cell = "1.17" 28 | serde = { version = "1", features = ["derive"] } 29 | serde_json = "1" 30 | sha2 = "0.10" 31 | thiserror.workspace = true 32 | time = { workspace = true, features = ["serde", "formatting", "parsing"] } 33 | uuid = { version = "1.1", features = ["serde", "v4", "js"] } 34 | 35 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 36 | directories-next = "2" 37 | ureq = { version = "2.6", features = [ 38 | "json", 39 | ] } # TODO(emilk): use ehttp for web support 40 | 41 | [target.'cfg(target_arch = "wasm32")'.dependencies] 42 | web-sys = { version = "0.3.58", features = ["Storage"] } 43 | 44 | 45 | [build-dependencies] 46 | re_build_build_info.workspace = true 47 | -------------------------------------------------------------------------------- /crates/re_analytics/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | re_build_build_info::export_env_vars(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/re_analytics/examples/end_to_end.rs: -------------------------------------------------------------------------------- 1 | use std::time::Duration; 2 | 3 | use re_analytics::{Analytics, Event}; 4 | 5 | fn input_filled_event(body: String) -> Event { 6 | Event::append("input_filled").with_prop("body", body) 7 | } 8 | 9 | fn main() { 10 | re_log::setup_native_logging(); 11 | 12 | let mut analytics = Analytics::new(Duration::from_secs(3)).unwrap(); 13 | analytics.register_append_property("application_id", "end_to_end_example"); 14 | analytics.register_append_property("recording_id", uuid::Uuid::new_v4().to_string()); 15 | 16 | println!("any non-empty line written here will be sent as an analytics datapoint"); 17 | loop { 18 | let mut input = String::new(); 19 | std::io::stdin().read_line(&mut input).unwrap(); 20 | 21 | let input = input.trim(); 22 | if !input.is_empty() { 23 | analytics.record(input_filled_event(input.to_owned())); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /crates/re_analytics/src/config_web.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::todo, clippy::unused_self)] 2 | 3 | use std::collections::HashMap; 4 | 5 | use uuid::Uuid; 6 | 7 | use crate::Property; 8 | 9 | // --- 10 | 11 | #[derive(thiserror::Error, Debug)] 12 | pub enum ConfigError { 13 | #[error("Couldn't compute config location")] 14 | UnknownLocation, 15 | 16 | #[error(transparent)] 17 | Io(#[from] std::io::Error), 18 | 19 | #[error(transparent)] 20 | Serde(#[from] serde_json::Error), 21 | } 22 | 23 | // NOTE: all the `rename` clauses are to avoid a potential catastrophe :) 24 | #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] 25 | pub struct Config { 26 | #[serde(rename = "analytics_enabled")] 27 | pub analytics_enabled: bool, 28 | 29 | // NOTE: not a UUID on purpose, it is sometimes useful to use handcrafted IDs. 30 | #[serde(rename = "analytics_id")] 31 | pub analytics_id: String, 32 | 33 | /// A unique ID for this session. 34 | #[serde(skip, default = "::uuid::Uuid::new_v4")] 35 | pub session_id: Uuid, 36 | 37 | #[serde(rename = "metadata", default)] 38 | pub metadata: HashMap, 39 | } 40 | 41 | impl Config { 42 | pub fn load() -> Result { 43 | todo!("web support") 44 | } 45 | 46 | pub fn save(&self) -> Result<(), ConfigError> { 47 | todo!("web support") 48 | } 49 | 50 | pub fn is_first_run(&self) -> bool { 51 | todo!("web support") 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /crates/re_analytics/src/pipeline_web.rs: -------------------------------------------------------------------------------- 1 | #![allow( 2 | clippy::needless_pass_by_value, 3 | clippy::unnecessary_wraps, 4 | clippy::unused_self 5 | )] 6 | 7 | use std::time::Duration; 8 | 9 | use crate::{Config, Event, PostHogSink}; 10 | 11 | // TODO(cmc): abstract away the concept of a `Pipeline` behind an actual trait when comes the time 12 | // to support more than just PostHog. 13 | 14 | // --- 15 | 16 | #[derive(thiserror::Error, Debug)] 17 | pub enum PipelineError { 18 | #[error(transparent)] 19 | Io(#[from] std::io::Error), 20 | 21 | #[error(transparent)] 22 | Serde(#[from] serde_json::Error), 23 | } 24 | 25 | /// An eventual, at-least-once(-ish) event pipeline, backed by a write-ahead log on the local disk. 26 | /// 27 | /// Flushing of the WAL is entirely left up to the OS page cache, hance the -ish. 28 | #[derive(Debug)] 29 | pub struct Pipeline {} 30 | 31 | impl Pipeline { 32 | pub fn new( 33 | _config: &Config, 34 | _tick: Duration, 35 | _sink: PostHogSink, 36 | ) -> Result, PipelineError> { 37 | Ok(None) 38 | } 39 | 40 | pub fn record(&self, _event: Event) {} 41 | } 42 | -------------------------------------------------------------------------------- /crates/re_analytics/src/sink_web.rs: -------------------------------------------------------------------------------- 1 | #[derive(thiserror::Error, Debug)] 2 | pub enum SinkError { 3 | #[error(transparent)] 4 | Io(#[from] std::io::Error), 5 | 6 | #[error(transparent)] 7 | Serde(#[from] serde_json::Error), 8 | } 9 | 10 | #[derive(Default, Debug, Clone)] 11 | pub struct PostHogSink {} 12 | -------------------------------------------------------------------------------- /crates/re_arrow_store/README.md: -------------------------------------------------------------------------------- 1 | # Rerun Arrow Store 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_data_store.svg)](https://crates.io/crates/re_data_store) 6 | [![Documentation](https://docs.rs/re_data_store/badge.svg)](https://docs.rs/re_data_store) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | [Apache Arrow](https://arrow.apache.org/) is a language-independent columnar memory format for arbitrary data. 11 | 12 | The `re_arrow_store` crate is an in-memory time series database for Rerun log data. It is indexed by Entity path, component, timeline, and time. It supports out-of-order insertions, and fast `O(log(N))` queries. 13 | -------------------------------------------------------------------------------- /crates/re_arrow_store/examples/latest_components.rs: -------------------------------------------------------------------------------- 1 | //! Demonstrates usage of [`re_arrow_store::polars_util::latest_components`]. 2 | //! 3 | //! ```text 4 | //! POLARS_FMT_MAX_ROWS=100 cargo r -p re_arrow_store --example latest_components 5 | //! ``` 6 | 7 | use polars_core::prelude::*; 8 | use re_arrow_store::polars_util::latest_components; 9 | use re_arrow_store::{test_row, DataStore, LatestAtQuery, TimeType, Timeline}; 10 | use re_log_types::{ 11 | component_types::{InstanceKey, Point2D, Rect2D}, 12 | datagen::{build_frame_nr, build_some_point2d, build_some_rects}, 13 | Component, EntityPath, 14 | }; 15 | 16 | fn main() { 17 | let mut store = DataStore::new(InstanceKey::name(), Default::default()); 18 | 19 | let ent_path = EntityPath::from("my/entity"); 20 | 21 | let row = test_row!(ent_path @ [build_frame_nr(2.into())] => 4; [build_some_rects(4)]); 22 | store.insert_row(&row).unwrap(); 23 | 24 | let row = test_row!(ent_path @ [build_frame_nr(3.into())] => 2; [build_some_point2d(2)]); 25 | store.insert_row(&row).unwrap(); 26 | 27 | let timeline_frame_nr = Timeline::new("frame_nr", TimeType::Sequence); 28 | let df = latest_components( 29 | &store, 30 | &LatestAtQuery::new(timeline_frame_nr, 10.into()), 31 | &ent_path, 32 | &[Point2D::name(), Rect2D::name()], 33 | &JoinType::Outer, 34 | ) 35 | .unwrap(); 36 | 37 | println!("Store contents:\n{}", store.to_dataframe()); 38 | println!("Query results:\n{df}"); 39 | } 40 | -------------------------------------------------------------------------------- /crates/re_build_build_info/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_build_build_info" 3 | authors.workspace = true 4 | description = "build.rs helpers for generating build info" 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dependencies] 20 | anyhow.workspace = true 21 | time = { workspace = true, features = ["formatting"] } 22 | -------------------------------------------------------------------------------- /crates/re_build_build_info/README.md: -------------------------------------------------------------------------------- 1 | # re_build_build_info 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_build_build_info.svg)](https://crates.io/crates/re_build_build_info) 6 | [![Documentation](https://docs.rs/re_build_build_info/badge.svg)](https://docs.rs/re_build_build_info) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | Library to be used in `build.rs` files in order to build the build info defined in `re_build_info` by setting environment variables. 11 | -------------------------------------------------------------------------------- /crates/re_build_info/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_build_info" 3 | authors.workspace = true 4 | description = "Information about the build. Use together with re_build_build_info" 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | -------------------------------------------------------------------------------- /crates/re_build_info/README.md: -------------------------------------------------------------------------------- 1 | # re_build_info 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_build_info.svg)](https://crates.io/crates/re_build_info) 6 | [![Documentation](https://docs.rs/re_build_info/badge.svg)](https://docs.rs/re_build_info) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | Build information provider for help/version commands and analytics. 11 | -------------------------------------------------------------------------------- /crates/re_build_info/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Information about the build of a Rust crate. 2 | //! 3 | //! To use this you also need to call `re_build_build_info::export_env_vars()` from your build.rs. 4 | 5 | mod build_info; 6 | mod crate_version; 7 | 8 | pub use build_info::BuildInfo; 9 | pub use crate_version::CrateVersion; 10 | 11 | /// Create a [`BuildInfo`] at compile-time using environment variables exported by 12 | /// calling `re_build_build_info::export_env_vars()` from your build.rs. 13 | #[macro_export] 14 | macro_rules! build_info { 15 | () => { 16 | $crate::BuildInfo { 17 | crate_name: "depthai-viewer", //env!("CARGO_PKG_NAME"), 18 | version: $crate::CrateVersion::parse(env!("CARGO_PKG_VERSION")), 19 | rustc_version: env!("RE_BUILD_RUSTC_VERSION"), 20 | llvm_version: env!("RE_BUILD_LLVM_VERSION"), 21 | git_hash: env!("RE_BUILD_GIT_HASH"), 22 | git_branch: env!("RE_BUILD_GIT_BRANCH"), 23 | // TODO(cmc): `PartialEq` is not available in const contexts, so this won't actually 24 | // build if you try to instantiate a BuildInfo in a constant. 25 | is_in_rerun_workspace: env!("RE_BUILD_IS_IN_RERUN_WORKSPACE") == "yes", 26 | target_triple: env!("RE_BUILD_TARGET_TRIPLE"), 27 | datetime: env!("RE_BUILD_DATETIME"), 28 | } 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /crates/re_build_web_viewer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_build_web_viewer" 3 | authors.workspace = true 4 | description = "Build the rerun web-viewer Wasm from source" 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dependencies] 20 | cargo_metadata = "0.15" 21 | -------------------------------------------------------------------------------- /crates/re_build_web_viewer/README.md: -------------------------------------------------------------------------------- 1 | # `re_build_web_viewer` 2 | 3 | Binary and library for building the Rerun web viewer. 4 | 5 | This is also called by the `build.rs` of `re_web_viewer_server`. 6 | 7 | ``` 8 | cargo r -p re_build_web_viewer -- --debug 9 | ```` 10 | 11 | ``` 12 | cargo r -p re_build_web_viewer -- --release 13 | ```` 14 | -------------------------------------------------------------------------------- /crates/re_build_web_viewer/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::process::ExitCode; 2 | 3 | fn main() -> ExitCode { 4 | let mut release = None; 5 | let mut webgpu = false; 6 | 7 | for arg in std::env::args().skip(1) { 8 | match arg.as_str() { 9 | "--help" => { 10 | print_help(); 11 | return ExitCode::SUCCESS; 12 | } 13 | "--debug" => { 14 | assert!(release.is_none(), "Can't set both --release and --debug"); 15 | release = Some(false); 16 | } 17 | "--release" => { 18 | assert!(release.is_none(), "Can't set both --release and --debug"); 19 | release = Some(true); 20 | } 21 | "--webgpu" => { 22 | webgpu = true; 23 | } 24 | _ => { 25 | print_help(); 26 | return ExitCode::FAILURE; 27 | } 28 | } 29 | } 30 | 31 | let Some(release) = release else { 32 | eprintln!("You need to pass either --debug or --release"); 33 | return ExitCode::FAILURE; 34 | }; 35 | 36 | re_build_web_viewer::build(release, webgpu); 37 | ExitCode::SUCCESS 38 | } 39 | 40 | fn print_help() { 41 | eprintln!( 42 | r"Build the web-viewer. 43 | 44 | --help: Print this help text 45 | --debug: Build a debug binary 46 | --release: Compile for release, and run wasm-opt. 47 | NOTE: --release also removes debug symbols which are otherwise useful for in-browser profiling. 48 | --webgpu: Enable WebGPU support (experimental). If not set the viewer will use WebGL instead. 49 | " 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /crates/re_data_store/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_data_store" 3 | authors.workspace = true 4 | description = "In-memory storage of Rerun log data, indexed for fast fast queries." 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [features] 20 | default = [] 21 | 22 | ## Enable (de)serialization using serde. 23 | serde = ["dep:serde", "re_log_types/serde"] 24 | 25 | 26 | [dependencies] 27 | re_arrow_store.workspace = true 28 | re_format.workspace = true 29 | re_int_histogram.workspace = true 30 | re_log.workspace = true 31 | re_log_encoding = { workspace = true, optional = true } 32 | re_log_types.workspace = true 33 | re_smart_channel.workspace = true 34 | 35 | ahash.workspace = true 36 | document-features = "0.2" 37 | itertools = { workspace = true } 38 | nohash-hasher = "0.2" 39 | serde = { version = "1", features = ["derive", "rc"], optional = true } 40 | thiserror = "1.0" 41 | 42 | # Native dependencies: 43 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 44 | puffin.workspace = true 45 | 46 | 47 | [dev-dependencies] 48 | criterion = "0.4" 49 | mimalloc.workspace = true 50 | rand = "0.8" 51 | re_log_encoding = { workspace = true, features = ["decoder", "encoder"] } 52 | 53 | [lib] 54 | bench = false 55 | 56 | [[example]] 57 | name = "memory_usage" 58 | path = "examples/memory_usage.rs" 59 | required-features = ["re_log_encoding/decoder", "re_log_encoding/encoder"] 60 | -------------------------------------------------------------------------------- /crates/re_data_store/README.md: -------------------------------------------------------------------------------- 1 | # re_data_store 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_data_store.svg)](https://crates.io/crates/re_data_store) 6 | [![Documentation](https://docs.rs/re_data_store/badge.svg)](https://docs.rs/re_data_store) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | In-memory storage of Rerun log data, indexed for fast fast queries. 11 | -------------------------------------------------------------------------------- /crates/re_error/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_error" 3 | authors.workspace = true 4 | description = "Helpers for handling errors." 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dev-dependencies] 20 | anyhow.workspace = true 21 | -------------------------------------------------------------------------------- /crates/re_error/README.md: -------------------------------------------------------------------------------- 1 | # re_error 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_error.svg)](https://crates.io/crates/re_error) 6 | [![Documentation](https://docs.rs/re_error/badge.svg)](https://docs.rs/re_error) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | Helpers for handling errors. 11 | -------------------------------------------------------------------------------- /crates/re_error/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Helpers for error handling. 2 | 3 | /// Format an error, including its chain of sources. 4 | /// 5 | /// Always use this when displaying an error. 6 | pub fn format(error: impl AsRef) -> String { 7 | fn format_impl(error: &dyn std::error::Error) -> String { 8 | let mut string = error.to_string(); 9 | for source in std::iter::successors(error.source(), |error| error.source()) { 10 | string.push_str(" -> "); 11 | string.push_str(&source.to_string()); 12 | } 13 | string 14 | } 15 | 16 | format_impl(error.as_ref()) 17 | } 18 | 19 | #[test] 20 | fn test_format() { 21 | let err = anyhow::format_err!("root_cause") 22 | .context("inner_context") 23 | .context("outer_context"); 24 | 25 | assert_eq!(err.to_string(), "outer_context"); // Oh no, we don't see the root cause! 26 | 27 | // Now we do: 28 | assert_eq!(format(&err), "outer_context -> inner_context -> root_cause"); 29 | } 30 | -------------------------------------------------------------------------------- /crates/re_format/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_format" 3 | authors.workspace = true 4 | description = "Miscellaneous tools to format and parse numbers, durations, etc." 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | [dependencies] 19 | arrow2.workspace = true 20 | arrow2_convert.workspace = true 21 | comfy-table.workspace = true 22 | re_tuid = { workspace = true, features = ["arrow2_convert"] } 23 | -------------------------------------------------------------------------------- /crates/re_format/README.md: -------------------------------------------------------------------------------- 1 | # re_format 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_format.svg)](https://crates.io/crates/re_format) 6 | [![Documentation](https://docs.rs/re_format/badge.svg)](https://docs.rs/re_format) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | 11 | Miscellaneous tools to format and parse numbers, durations, etc. 12 | -------------------------------------------------------------------------------- /crates/re_int_histogram/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_int_histogram" 3 | authors.workspace = true 4 | description = "A histogram with `i64` keys and `u32` counts, supporting both sparse and dense uses." 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dependencies] 20 | smallvec.workspace = true 21 | static_assertions = "1.1" 22 | 23 | 24 | [dev-dependencies] 25 | criterion = "0.4" 26 | insta = "1.23" 27 | mimalloc.workspace = true 28 | 29 | 30 | [lib] 31 | bench = false 32 | 33 | [[bench]] 34 | name = "int_histogram_benchmark" 35 | harness = false 36 | -------------------------------------------------------------------------------- /crates/re_int_histogram/README.md: -------------------------------------------------------------------------------- 1 | # re_int_histogram 2 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 3 | 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_int_histogram.svg)](https://crates.io/crates/re_int_histogram) 6 | [![Documentation](https://docs.rs/re_int_histogram/badge.svg)](https://docs.rs/re_int_histogram) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | A histogram with `i64` keys and `u32` counts, supporting both sparse and dense uses. 11 | 12 | It supports high-level summaries of the histogram, so that you can quickly get a birds-eye view of the data without having to visit every point in the histogram. 13 | 14 | You can also think of the histogram as a multi-set, where you can insert the same key multiple times and then query how many times you've inserted it. 15 | 16 | Used for noting at which times we have events, so that we can visualize it in the time panel. 17 | -------------------------------------------------------------------------------- /crates/re_int_histogram/tests/snapshots/memory_test__Int64Histogram.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/re_int_histogram/tests/memory_test.rs 3 | assertion_line: 126 4 | expression: "[format!(\"{:.1} B/entry, dense\", bytes_per_entry(N, 1)),\n format!(\"{:.1} B/entry, spacing: 1M\", bytes_per_entry(N, 1_000_000)),\n format!(\"{:.1} B/entry, spacing: 2M\", bytes_per_entry(N, 2_000_000)),\n format!(\"{:.1} B/entry, spacing: 3M\", bytes_per_entry(N, 3_000_000)),\n format!(\"{:.1} B/entry, spacing: 5M\", bytes_per_entry(N, 5_000_000)),\n format!(\"{:.1} B/entry, spacing: 8M\", bytes_per_entry(N, 8_000_000)),\n format!(\"{:.1} B/entry, spacing: 13M\",\n bytes_per_entry(N, 13_000_000))]" 5 | --- 6 | [ 7 | "9.6 B/entry, dense", 8 | "29.5 B/entry, spacing: 1M", 9 | "34.2 B/entry, spacing: 2M", 10 | "44.6 B/entry, spacing: 3M", 11 | "50.9 B/entry, spacing: 5M", 12 | "73.2 B/entry, spacing: 8M", 13 | "26.0 B/entry, spacing: 13M", 14 | ] 15 | -------------------------------------------------------------------------------- /crates/re_int_histogram/tests/snapshots/memory_test__btree.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/re_int_histogram/tests/memory_test.rs 3 | assertion_line: 87 4 | expression: "[format!(\"{:.1} B/entry, dense\", bytes_per_entry(N, 1)),\n format!(\"{:.1} B/entry, spacing: 1M\", bytes_per_entry(N, 1_000_000)),\n format!(\"{:.1} B/entry, spacing: 2M\", bytes_per_entry(N, 2_000_000)),\n format!(\"{:.1} B/entry, spacing: 3M\", bytes_per_entry(N, 3_000_000)),\n format!(\"{:.1} B/entry, spacing: 5M\", bytes_per_entry(N, 5_000_000)),\n format!(\"{:.1} B/entry, spacing: 8M\", bytes_per_entry(N, 8_000_000)),\n format!(\"{:.1} B/entry, spacing: 13M\",\n bytes_per_entry(N, 13_000_000))]" 5 | --- 6 | [ 7 | "26.3 B/entry, dense", 8 | "26.3 B/entry, spacing: 1M", 9 | "26.3 B/entry, spacing: 2M", 10 | "26.3 B/entry, spacing: 3M", 11 | "26.3 B/entry, spacing: 5M", 12 | "26.3 B/entry, spacing: 8M", 13 | "26.3 B/entry, spacing: 13M", 14 | ] 15 | -------------------------------------------------------------------------------- /crates/re_log/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "re_log" 3 | authors.workspace = true 4 | description = "Helpers for setting up and doing text logging in the Rerun crates." 5 | edition.workspace = true 6 | homepage.workspace = true 7 | include.workspace = true 8 | license.workspace = true 9 | publish = true 10 | readme = "README.md" 11 | repository.workspace = true 12 | rust-version.workspace = true 13 | version.workspace = true 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | 18 | 19 | [dependencies] 20 | log = { version = "0.4", features = ["std"] } 21 | log-once = "0.4" 22 | parking_lot.workspace = true 23 | 24 | # make sure dependencies that user tracing gets forwarded to `log`: 25 | tracing = { version = "0.1", features = ["log"] } 26 | 27 | # Native dependencies: 28 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 29 | env_logger = "0.10" 30 | 31 | # web dependencies: 32 | [target.'cfg(target_arch = "wasm32")'.dependencies] 33 | js-sys = "0.3" 34 | wasm-bindgen = "=0.2.84" 35 | -------------------------------------------------------------------------------- /crates/re_log/README.md: -------------------------------------------------------------------------------- 1 | # re_log 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_log.svg)](https://crates.io/crates/re_log) 6 | [![Documentation](https://docs.rs/re_log/badge.svg)](https://docs.rs/re_log) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | Helpers for setting up and doing text logging in the Rerun crates. 11 | -------------------------------------------------------------------------------- /crates/re_log/src/channel_logger.rs: -------------------------------------------------------------------------------- 1 | //! Capture log messages and send them to some receiver over a channel. 2 | 3 | pub struct LogMsg { 4 | /// The verbosity level. 5 | pub level: log::Level, 6 | 7 | /// The module, starting with the crate name. 8 | pub target: String, 9 | 10 | /// The contents of the log message. 11 | pub msg: String, 12 | } 13 | 14 | /// Pipe log messages to a channel. 15 | pub struct ChannelLogger { 16 | filter: log::LevelFilter, 17 | tx: parking_lot::Mutex>, 18 | } 19 | 20 | impl ChannelLogger { 21 | pub fn new(filter: log::LevelFilter) -> (Self, std::sync::mpsc::Receiver) { 22 | let (tx, rx) = std::sync::mpsc::channel(); 23 | ( 24 | Self { 25 | filter, 26 | tx: tx.into(), 27 | }, 28 | rx, 29 | ) 30 | } 31 | } 32 | 33 | impl log::Log for ChannelLogger { 34 | fn enabled(&self, metadata: &log::Metadata<'_>) -> bool { 35 | crate::is_log_enabled(self.filter, metadata) 36 | } 37 | 38 | fn log(&self, record: &log::Record<'_>) { 39 | if !self.enabled(record.metadata()) { 40 | return; 41 | } 42 | 43 | self.tx 44 | .lock() 45 | .send(LogMsg { 46 | level: record.level(), 47 | target: record.target().to_owned(), 48 | msg: record.args().to_string(), 49 | }) 50 | .ok(); 51 | } 52 | 53 | fn flush(&self) {} 54 | } 55 | -------------------------------------------------------------------------------- /crates/re_log_encoding/README.md: -------------------------------------------------------------------------------- 1 | # re_log_encoding 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_log_encoding.svg)](https://crates.io/crates/re_log_encoding) 6 | [![Documentation](https://docs.rs/re_log_encoding/badge.svg)](https://docs.rs/re_log_encoding) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | Helper library for encoding Rerun log messages. 11 | -------------------------------------------------------------------------------- /crates/re_log_encoding/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Crate that handles encoding of rerun log types. 2 | 3 | #[cfg(feature = "decoder")] 4 | pub mod decoder; 5 | #[cfg(feature = "encoder")] 6 | #[cfg(not(target_arch = "wasm32"))] // we do no yet support encoding LogMsgs in the browser 7 | pub mod encoder; 8 | 9 | #[cfg(feature = "encoder")] 10 | #[cfg(not(target_arch = "wasm32"))] 11 | mod file_sink; 12 | 13 | #[cfg(feature = "decoder")] 14 | pub mod stream_rrd_from_http; 15 | 16 | // --------------------------------------------------------------------- 17 | 18 | #[cfg(feature = "encoder")] 19 | #[cfg(not(target_arch = "wasm32"))] 20 | pub use file_sink::{FileSink, FileSinkError}; 21 | 22 | // --------------------------------------------------------------------------- 23 | 24 | /// Profiling macro for feature "puffin" 25 | #[doc(hidden)] 26 | #[macro_export] 27 | macro_rules! profile_function { 28 | ($($arg: tt)*) => { 29 | #[cfg(not(target_arch = "wasm32"))] 30 | puffin::profile_function!($($arg)*); 31 | }; 32 | } 33 | 34 | /// Profiling macro for feature "puffin" 35 | #[doc(hidden)] 36 | #[macro_export] 37 | macro_rules! profile_scope { 38 | ($($arg: tt)*) => { 39 | #[cfg(not(target_arch = "wasm32"))] 40 | puffin::profile_scope!($($arg)*); 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /crates/re_log_types/README.md: -------------------------------------------------------------------------------- 1 | # re_log_types 2 | 3 | Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. 4 | 5 | [![Latest version](https://img.shields.io/crates/v/re_log_types.svg)](https://crates.io/crates/re_log_types) 6 | [![Documentation](https://docs.rs/re_log_types/badge.svg)](https://docs.rs/re_log_types) 7 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) 8 | ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) 9 | 10 | The different types that make up the rerun log format. 11 | -------------------------------------------------------------------------------- /crates/re_log_types/src/component_types/class_id.rs: -------------------------------------------------------------------------------- 1 | use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize}; 2 | 3 | use crate::Component; 4 | 5 | /// A 16-bit ID representing a type of semantic class. 6 | /// 7 | /// Used to look up a [`crate::context::ClassDescription`] within the [`crate::context::AnnotationContext`]. 8 | #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] 9 | #[derive( 10 | Clone, 11 | Copy, 12 | Debug, 13 | Default, 14 | PartialEq, 15 | Eq, 16 | PartialOrd, 17 | Ord, 18 | Hash, 19 | ArrowField, 20 | ArrowSerialize, 21 | ArrowDeserialize, 22 | )] 23 | #[arrow_field(transparent)] 24 | pub struct ClassId(pub u16); 25 | 26 | impl Component for ClassId { 27 | #[inline] 28 | fn name() -> crate::ComponentName { 29 | "rerun.class_id".into() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /crates/re_log_types/src/component_types/imu.rs: -------------------------------------------------------------------------------- 1 | use crate::{Component, EntityPath}; 2 | use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize}; 3 | 4 | use super::{Point3D, Quaternion}; 5 | 6 | #[derive(Clone, Debug, PartialEq, ArrowField, ArrowSerialize, ArrowDeserialize)] 7 | pub struct ImuData { 8 | pub accel: Point3D, 9 | pub gyro: Point3D, 10 | pub mag: Option, 11 | pub orientation: Quaternion, 12 | } 13 | 14 | impl ImuData { 15 | pub fn entity_path() -> EntityPath { 16 | "imu_data".into() 17 | } 18 | } 19 | 20 | impl Component for ImuData { 21 | #[inline] 22 | fn name() -> crate::ComponentName { 23 | "rerun.imu".into() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/re_log_types/src/component_types/keypoint_id.rs: -------------------------------------------------------------------------------- 1 | use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize}; 2 | 3 | use crate::Component; 4 | 5 | /// A 16-bit ID representing a type of semantic keypoint within a class. 6 | /// 7 | /// `KeypointId`s are only meaningful within the context of a [`crate::context::ClassDescription`]. 8 | /// 9 | /// Used to look up an [`crate::context::AnnotationInfo`] for a Keypoint within the [`crate::context::AnnotationContext`]. 10 | #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] 11 | #[derive( 12 | Clone, 13 | Copy, 14 | Debug, 15 | Default, 16 | PartialEq, 17 | Eq, 18 | PartialOrd, 19 | Ord, 20 | Hash, 21 | ArrowField, 22 | ArrowSerialize, 23 | ArrowDeserialize, 24 | )] 25 | #[arrow_field(transparent)] 26 | pub struct KeypointId(pub u16); 27 | 28 | impl Component for KeypointId { 29 | #[inline] 30 | fn name() -> crate::ComponentName { 31 | "rerun.keypoint_id".into() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/re_log_types/src/component_types/label.rs: -------------------------------------------------------------------------------- 1 | use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize}; 2 | 3 | use crate::Component; 4 | 5 | /// A String label component 6 | /// 7 | /// ``` 8 | /// use re_log_types::component_types::Label; 9 | /// use arrow2_convert::field::ArrowField; 10 | /// use arrow2::datatypes::{DataType, Field}; 11 | /// 12 | /// assert_eq!(Label::data_type(), DataType::Utf8); 13 | /// ``` 14 | #[derive(Debug, Clone, PartialEq, Eq, ArrowField, ArrowSerialize, ArrowDeserialize)] 15 | #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] 16 | #[arrow_field(transparent)] 17 | pub struct Label(pub String); 18 | 19 | impl Component for Label { 20 | #[inline] 21 | fn name() -> crate::ComponentName { 22 | "rerun.label".into() 23 | } 24 | } 25 | 26 | impl From for Label { 27 | #[inline] 28 | fn from(value: String) -> Self { 29 | Self(value) 30 | } 31 | } 32 | 33 | impl From