From d3dd82f478507e5632cbd624eb4aa0c7ebeccc0c Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Fri, 25 Oct 2024 15:04:45 -0400 Subject: [PATCH] Feature plumbing for rrdp --- Cargo.lock | 1 + Cargo.toml | 2 +- crates/store/re_data_source/Cargo.toml | 6 ++++++ crates/store/re_data_source/src/data_source.rs | 4 ++++ crates/top/rerun-cli/Cargo.toml | 3 +++ crates/top/rerun/Cargo.toml | 3 +++ crates/viewer/re_viewer/Cargo.toml | 3 +++ 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7b39947f369e..50488abb4123 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5292,6 +5292,7 @@ dependencies = [ "re_log", "re_log_encoding", "re_log_types", + "re_remote_store_types", "re_smart_channel", "re_tracing", "re_ws_comms", diff --git a/Cargo.toml b/Cargo.toml index 8a7db8beed90..3f0506ea335a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ re_format_arrow = { path = "crates/store/re_format_arrow", version = "=0.20.0-al re_log_encoding = { path = "crates/store/re_log_encoding", version = "=0.20.0-alpha.1", default-features = false } re_log_types = { path = "crates/store/re_log_types", version = "=0.20.0-alpha.1", default-features = false } re_query = { path = "crates/store/re_query", version = "=0.20.0-alpha.1", default-features = false } -re_remote_store_types = { path = "crates/build/re_remote_store_types", version = "=0.20.0-alpha.1", default-features = false } +re_remote_store_types = { path = "crates/store/re_remote_store_types", version = "=0.20.0-alpha.1", default-features = false } re_sdk_comms = { path = "crates/store/re_sdk_comms", version = "=0.20.0-alpha.1", default-features = false } re_types = { path = "crates/store/re_types", version = "=0.20.0-alpha.1", default-features = false } re_types_blueprint = { path = "crates/store/re_types_blueprint", version = "=0.20.0-alpha.1", default-features = false } diff --git a/crates/store/re_data_source/Cargo.toml b/crates/store/re_data_source/Cargo.toml index e6ec0b7bd022..e1513d785a47 100644 --- a/crates/store/re_data_source/Cargo.toml +++ b/crates/store/re_data_source/Cargo.toml @@ -22,6 +22,9 @@ all-features = true [features] default = [] +## Enable the rrdp data source. +rrdp = ["dep:re_remote_store_types"] + [dependencies] re_data_loader.workspace = true @@ -39,5 +42,8 @@ anyhow.workspace = true itertools.workspace = true rayon.workspace = true +# Optional dependencies: +re_remote_store_types = { workspace = true, optional = true } + [build-dependencies] re_build_tools.workspace = true diff --git a/crates/store/re_data_source/src/data_source.rs b/crates/store/re_data_source/src/data_source.rs index 4642262ec21b..e1e8f3fa51e6 100644 --- a/crates/store/re_data_source/src/data_source.rs +++ b/crates/store/re_data_source/src/data_source.rs @@ -31,6 +31,10 @@ pub enum DataSource { // RRD data streaming in from standard input. #[cfg(not(target_arch = "wasm32"))] Stdin, + + /// A remote file, served over RRDP interface. + #[cfg(feature = "rrdp")] + RrdpUrl { url: String }, } impl DataSource { diff --git a/crates/top/rerun-cli/Cargo.toml b/crates/top/rerun-cli/Cargo.toml index 9d8859f029f1..60427a58b038 100644 --- a/crates/top/rerun-cli/Cargo.toml +++ b/crates/top/rerun-cli/Cargo.toml @@ -55,6 +55,9 @@ nasm = ["rerun/nasm"] ## This adds a lot of extra dependencies, so only enable this feature if you need it! native_viewer = ["rerun/native_viewer"] +## Enable the rrdp data source. +rrdp = ["rerun/rrdp"] + ## Support serving a web viewer over HTTP. ## ## Enabling this inflates the binary size quite a bit, since it embeds the viewer wasm. diff --git a/crates/top/rerun/Cargo.toml b/crates/top/rerun/Cargo.toml index 4e7551e5d36a..b0f514dc97e1 100644 --- a/crates/top/rerun/Cargo.toml +++ b/crates/top/rerun/Cargo.toml @@ -83,6 +83,9 @@ nasm = ["re_video/nasm"] ## This adds a lot of extra dependencies, so only enable this feature if you need it! native_viewer = ["dep:re_viewer"] +## Enable the rrdp data source. +rrdp = ["re_viewer/rrdp"] + ## Add support for the [`run()`] function, which acts like a main-function for a CLI, ## acting the same as [the `rerun` binary](https://crates.io/crates/rerun-cli). run = [ diff --git a/crates/viewer/re_viewer/Cargo.toml b/crates/viewer/re_viewer/Cargo.toml index 7cf74b51cdd5..700bd6eacc39 100644 --- a/crates/viewer/re_viewer/Cargo.toml +++ b/crates/viewer/re_viewer/Cargo.toml @@ -36,6 +36,9 @@ default = ["analytics"] ## Enable telemetry using our analytics SDK. analytics = ["dep:re_analytics"] +## Enable the rrdp data source. +rrdp = ["re_data_source/rrdp"] + [dependencies] # Internal: