diff --git a/crates/store/re_rrdp_comms/Cargo.toml b/crates/store/re_rrdp_comms/Cargo.toml new file mode 100644 index 000000000000..35de9e294f5f --- /dev/null +++ b/crates/store/re_rrdp_comms/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "re_rrdp_comms" +authors.workspace = true +description = "Client comms for RRDP GRPC server" +edition.workspace = true +homepage.workspace = true +include.workspace = true +license.workspace = true +publish = true +readme = "README.md" +repository.workspace = true +rust-version.workspace = true +version.workspace = true + +[lints] +workspace = true + +[package.metadata.docs.rs] +all-features = true + + +[dependencies] +re_log.workspace = true +re_log_types.workspace = true +re_smart_channel.workspace = true diff --git a/crates/store/re_rrdp_comms/README.md b/crates/store/re_rrdp_comms/README.md new file mode 100644 index 000000000000..234c1a7dd8db --- /dev/null +++ b/crates/store/re_rrdp_comms/README.md @@ -0,0 +1,10 @@ +# re_ws_comms + +Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. + +[![Latest version](https://img.shields.io/crates/v/re_ws_comms.svg)](https://crates.io/crates/re_ws_comms) +[![Documentation](https://docs.rs/re_ws_comms/badge.svg)](https://docs.rs/re_ws_comms) +![MIT](https://img.shields.io/badge/license-MIT-blue.svg) +![Apache](https://img.shields.io/badge/license-Apache-blue.svg) + +Client-side grpc communication library with an RRDP server. diff --git a/crates/store/re_rrdp_comms/src/lib.rs b/crates/store/re_rrdp_comms/src/lib.rs new file mode 100644 index 000000000000..de6c661aaf74 --- /dev/null +++ b/crates/store/re_rrdp_comms/src/lib.rs @@ -0,0 +1,20 @@ +//! Communications with an RRDP GRPC server. + +use re_log_types::LogMsg; + +/// Stream an rrd file from an RRDP server. +/// +/// `on_msg` can be used to wake up the UI thread on Wasm. +pub fn stream_recording( + url: String, + _on_msg: Option>, +) -> re_smart_channel::Receiver { + let (tx, rx) = re_smart_channel::smart_channel( + re_smart_channel::SmartMessageSource::RrdpStream { url: url.clone() }, + re_smart_channel::SmartChannelSource::RrdpStream { url: url.clone() }, + ); + + // TODO(jleibs): Implement the actual streaming logic here + + rx +}