Skip to content

Commit

Permalink
Stub library for re_rrdp_comms
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Oct 25, 2024
1 parent 23458eb commit 993565e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
25 changes: 25 additions & 0 deletions crates/store/re_rrdp_comms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions crates/store/re_rrdp_comms/README.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 20 additions & 0 deletions crates/store/re_rrdp_comms/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<Box<dyn Fn() + Send + Sync>>,
) -> re_smart_channel::Receiver<LogMsg> {
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
}

0 comments on commit 993565e

Please sign in to comment.