From eeab933ebf28fc32d68084d8c1d699055c9b8f4a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 19 Aug 2025 12:03:46 -0700 Subject: [PATCH 01/13] add send_bytes --- livekit-protocol/protocol | 2 +- livekit/src/room/data_stream/outgoing.rs | 48 +++++++++++++++++++ .../src/room/participant/local_participant.rs | 17 +++++++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index 2bc93ddc2..b047e92f0 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit 2bc93ddc27ccfa66ee8d270a1bcd115586fb601d +Subproject commit b047e92f055de744e5a5293848830cd803f3217b diff --git a/livekit/src/room/data_stream/outgoing.rs b/livekit/src/room/data_stream/outgoing.rs index 68f18dcf2..cfe8b6a13 100644 --- a/livekit/src/room/data_stream/outgoing.rs +++ b/livekit/src/room/data_stream/outgoing.rs @@ -386,6 +386,54 @@ impl OutgoingStreamManager { Ok(info) } + /// Send bytes to participants in the room. + /// + /// This method sends an in-memory blob of bytes to participants in the room + /// as a byte stream. It opens a stream using the provided options, writes the + /// entire buffer, and closes the stream before returning. + /// + /// The `total_length` in the header is set from the provided data and is not + /// overridable by `options.total_length`. + pub async fn send_bytes( + &self, + data: impl AsRef<[u8]>, + options: StreamByteOptions, + ) -> StreamResult { + let bytes = data.as_ref(); + + let byte_header = proto::data_stream::ByteHeader { + name: options.name.unwrap_or_default(), + }; + let header = proto::data_stream::Header { + stream_id: options.id.unwrap_or_else(|| create_random_uuid()), + timestamp: Utc::now().timestamp_millis(), + topic: options.topic, + mime_type: options.mime_type.unwrap_or_else(|| BYTE_MIME_TYPE.to_owned()), + total_length: Some(bytes.len() as u64), // not overridable + encryption_type: proto::encryption::Type::None.into(), + attributes: options.attributes, + content_header: Some(proto::data_stream::header::ContentHeader::ByteHeader( + byte_header.clone(), + )), + }; + + let open_options = RawStreamOpenOptions { + header: header.clone(), + destination_identities: options.destination_identities, + packet_tx: self.packet_tx.clone(), + }; + let writer = ByteStreamWriter { + info: Arc::new(ByteStreamInfo::from_headers(header, byte_header)), + stream: Arc::new(Mutex::new(RawStream::open(open_options).await?)), + }; + + let info = (*writer.info).clone(); + writer.write(bytes).await?; + writer.close().await?; + + Ok(info) + } + pub async fn send_file( &self, path: impl AsRef, diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index edeac969b..ee8e6742c 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -949,6 +949,23 @@ impl LocalParticipant { self.session().unwrap().outgoing_stream_manager.send_file(path, options).await } + /// Send an in-memory blob of bytes to participants in the room. + /// + /// This method sends a provided byte slice as a byte stream. + /// + /// # Arguments + /// + /// * `data` - The bytes to send. + /// * `options` - Configuration options for the byte stream, including topic and + /// destination participants. + pub async fn send_bytes( + &self, + data: impl AsRef<[u8]>, + options: StreamByteOptions, + ) -> StreamResult { + self.session().unwrap().outgoing_stream_manager.send_bytes(data, options).await + } + /// Stream text incrementally to participants in the room. /// /// This method allows sending text data in chunks as it becomes available. From 6b631898547b82fbcca06de0085cf719ca35cb26 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:08:30 +1000 Subject: [PATCH 02/13] Document integration testing --- livekit/tests/README.md | 10 ++++++++++ livekit/tests/data_channel_test.rs | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 livekit/tests/README.md diff --git a/livekit/tests/README.md b/livekit/tests/README.md new file mode 100644 index 000000000..a31f2d297 --- /dev/null +++ b/livekit/tests/README.md @@ -0,0 +1,10 @@ +# Integration Tests + +Some test cases depend on a LiveKit server and thus are not enabled by default; +to run them, start a local LiveKit server in development mode, and enable the +E2E test feature: + +```sh +livekit-server --dev +cargo test --features __lk-e2e-test +``` diff --git a/livekit/tests/data_channel_test.rs b/livekit/tests/data_channel_test.rs index ba155aa8f..a6088e045 100644 --- a/livekit/tests/data_channel_test.rs +++ b/livekit/tests/data_channel_test.rs @@ -7,14 +7,6 @@ use tokio::{sync::oneshot, time}; mod common; -// These tests depend on a LiveKit server, and thus are not enabled by default; -// to run them, start a local LiveKit server in development mode, and enable the -// E2E test feature: -// -// > livekit-server --dev -// > cargo test --features __lk-e2e-test -// - #[cfg(feature = "__lk-e2e-test")] #[tokio::test] async fn test_reliable_retry() -> Result<()> { From 665082e2eafdf2c4096a42a09b785b9fbaab669c Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:13:04 +1000 Subject: [PATCH 03/13] Add data stream tests --- livekit/tests/data_stream_test.rs | 102 ++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 livekit/tests/data_stream_test.rs diff --git a/livekit/tests/data_stream_test.rs b/livekit/tests/data_stream_test.rs new file mode 100644 index 000000000..f189f8ff3 --- /dev/null +++ b/livekit/tests/data_stream_test.rs @@ -0,0 +1,102 @@ +#![allow(unused_imports)] +use crate::common::test_rooms; +use anyhow::{anyhow, Context, Ok, Result}; +use chrono::{TimeDelta, Utc}; +use livekit::{ + OperationType, RoomEvent, StreamByteOptions, StreamReader, StreamTextOptions, TextStreamInfo, +}; +use std::{sync::Mutex, time::Duration}; +use tokio::{time::timeout, try_join}; + +mod common; + +#[cfg(feature = "__lk-e2e-test")] +#[tokio::test] +async fn test_send_bytes() -> Result<()> { + let mut rooms = test_rooms(2).await?; + let (sending_room, _) = rooms.pop().unwrap(); + let (_, mut receiving_event_rx) = rooms.pop().unwrap(); + let sender_identity = sending_room.local_participant().identity(); + + const BYTES_TO_SEND: &[u8] = &[0xFA; 16]; + + let send_text = async move { + let options = StreamByteOptions { topic: "some-topic".into(), ..Default::default() }; + let stream_info = + sending_room.local_participant().send_bytes(BYTES_TO_SEND, options).await?; + + assert!(!stream_info.id.is_empty()); + assert!( + stream_info.timestamp.signed_duration_since(Utc::now()).abs() <= TimeDelta::seconds(1) + ); + assert!(stream_info.total_length.is_some()); + assert_eq!(stream_info.mime_type, "application/octet-stream"); + assert_eq!(stream_info.topic, "some-topic"); + + Ok(()) + }; + let receive_text = async move { + while let Some(event) = receiving_event_rx.recv().await { + let RoomEvent::ByteStreamOpened { reader, topic, participant_identity } = event else { + continue; + }; + assert_eq!(topic, "some-topic"); + assert_eq!(participant_identity, sender_identity); + + let Some(reader) = reader.take() else { + return Err(anyhow!("Failed to take reader")); + }; + assert_eq!(reader.read_all().await?, BYTES_TO_SEND); + break; + } + Ok(()) + }; + + timeout(Duration::from_secs(5), async { try_join!(send_text, receive_text) }).await??; + Ok(()) +} + +#[cfg(feature = "__lk-e2e-test")] +#[tokio::test] +async fn test_send_text() -> Result<()> { + let mut rooms = test_rooms(2).await?; + let (sending_room, _) = rooms.pop().unwrap(); + let (_, mut receiving_event_rx) = rooms.pop().unwrap(); + let sender_identity = sending_room.local_participant().identity(); + + const TEXT_TO_SEND: &str = "some-text"; + + let send_text = async move { + let options = StreamTextOptions { topic: "some-topic".into(), ..Default::default() }; + let stream_info = sending_room.local_participant().send_text(TEXT_TO_SEND, options).await?; + + assert!(!stream_info.id.is_empty()); + assert!( + stream_info.timestamp.signed_duration_since(Utc::now()).abs() <= TimeDelta::seconds(1) + ); + assert!(stream_info.total_length.is_some()); + assert_eq!(stream_info.mime_type, "text/plain"); + assert_eq!(stream_info.topic, "some-topic"); + + Ok(()) + }; + let receive_text = async move { + while let Some(event) = receiving_event_rx.recv().await { + let RoomEvent::TextStreamOpened { reader, topic, participant_identity } = event else { + continue; + }; + assert_eq!(topic, "some-topic"); + assert_eq!(participant_identity, sender_identity); + + let Some(reader) = reader.take() else { + return Err(anyhow!("Failed to take reader")); + }; + assert_eq!(reader.read_all().await?, TEXT_TO_SEND); + break; + } + Ok(()) + }; + + timeout(Duration::from_secs(5), async { try_join!(send_text, receive_text) }).await??; + Ok(()) +} From ab2740dd855f1151e64fcf08ce1114411e4b33ef Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:25:05 +1000 Subject: [PATCH 04/13] Reorganize E2E tests --- livekit/tests/common/e2e.rs | 56 ++++++++++++++++++++++++++++ livekit/tests/common/mod.rs | 60 +++--------------------------- livekit/tests/data_channel_test.rs | 14 ++++--- livekit/tests/data_stream_test.rs | 19 ++++++---- 4 files changed, 80 insertions(+), 69 deletions(-) create mode 100644 livekit/tests/common/e2e.rs diff --git a/livekit/tests/common/e2e.rs b/livekit/tests/common/e2e.rs new file mode 100644 index 000000000..676c758c4 --- /dev/null +++ b/livekit/tests/common/e2e.rs @@ -0,0 +1,56 @@ +use anyhow::{Context, Result}; +use futures_util::future::try_join_all; +use libwebrtc::native::create_random_uuid; +use livekit::{Room, RoomEvent, RoomOptions}; +use livekit_api::access_token::{AccessToken, VideoGrants}; +use std::{env, time::Duration}; +use tokio::sync::mpsc::UnboundedReceiver; + +struct TestEnvironment { + api_key: String, + api_secret: String, + server_url: String, +} + +impl TestEnvironment { + /// Reads API key, secret, and server URL from the environment, using the + /// development defaults for values that are not present. + pub fn from_env_or_defaults() -> Self { + Self { + api_key: env::var("LIVEKIT_API_KEY").unwrap_or("devkey".into()), + api_secret: env::var("LIVEKIT_API_SECRET").unwrap_or("secret".into()), + server_url: env::var("LIVEKIT_URL").unwrap_or("http://localhost:7880".into()), + } + } +} + +/// Creates the specified number of connections to a shared room for testing. +pub async fn test_rooms(count: usize) -> Result)>> { + let test_env = TestEnvironment::from_env_or_defaults(); + let room_name = format!("test_room_{}", create_random_uuid()); + + let tokens = (0..count) + .into_iter() + .map(|id| -> Result { + let grants = + VideoGrants { room_join: true, room: room_name.clone(), ..Default::default() }; + Ok(AccessToken::with_api_key(&test_env.api_key, &test_env.api_secret) + .with_ttl(Duration::from_secs(30 * 60)) // 30 minutes + .with_grants(grants) + .with_identity(&format!("p{}", id)) + .to_jwt() + .context("Failed to generate JWT")?) + }) + .collect::>>()?; + + let rooms = try_join_all(tokens.into_iter().map(|token| { + let server_url = test_env.server_url.clone(); + async move { + let options = RoomOptions::default(); + Room::connect(&server_url, &token, options).await.context("Failed to connect to room") + } + })) + .await?; + + Ok(rooms) +} diff --git a/livekit/tests/common/mod.rs b/livekit/tests/common/mod.rs index 676c758c4..2c5247768 100644 --- a/livekit/tests/common/mod.rs +++ b/livekit/tests/common/mod.rs @@ -1,56 +1,6 @@ -use anyhow::{Context, Result}; -use futures_util::future::try_join_all; -use libwebrtc::native::create_random_uuid; -use livekit::{Room, RoomEvent, RoomOptions}; -use livekit_api::access_token::{AccessToken, VideoGrants}; -use std::{env, time::Duration}; -use tokio::sync::mpsc::UnboundedReceiver; +#[cfg(feature = "__lk-e2e-test")] +/// Utilities for end-to-end testing with a LiveKit server. +mod e2e; -struct TestEnvironment { - api_key: String, - api_secret: String, - server_url: String, -} - -impl TestEnvironment { - /// Reads API key, secret, and server URL from the environment, using the - /// development defaults for values that are not present. - pub fn from_env_or_defaults() -> Self { - Self { - api_key: env::var("LIVEKIT_API_KEY").unwrap_or("devkey".into()), - api_secret: env::var("LIVEKIT_API_SECRET").unwrap_or("secret".into()), - server_url: env::var("LIVEKIT_URL").unwrap_or("http://localhost:7880".into()), - } - } -} - -/// Creates the specified number of connections to a shared room for testing. -pub async fn test_rooms(count: usize) -> Result)>> { - let test_env = TestEnvironment::from_env_or_defaults(); - let room_name = format!("test_room_{}", create_random_uuid()); - - let tokens = (0..count) - .into_iter() - .map(|id| -> Result { - let grants = - VideoGrants { room_join: true, room: room_name.clone(), ..Default::default() }; - Ok(AccessToken::with_api_key(&test_env.api_key, &test_env.api_secret) - .with_ttl(Duration::from_secs(30 * 60)) // 30 minutes - .with_grants(grants) - .with_identity(&format!("p{}", id)) - .to_jwt() - .context("Failed to generate JWT")?) - }) - .collect::>>()?; - - let rooms = try_join_all(tokens.into_iter().map(|token| { - let server_url = test_env.server_url.clone(); - async move { - let options = RoomOptions::default(); - Room::connect(&server_url, &token, options).await.context("Failed to connect to room") - } - })) - .await?; - - Ok(rooms) -} +#[cfg(feature = "__lk-e2e-test")] +pub use e2e::*; \ No newline at end of file diff --git a/livekit/tests/data_channel_test.rs b/livekit/tests/data_channel_test.rs index a6088e045..bb6590a2a 100644 --- a/livekit/tests/data_channel_test.rs +++ b/livekit/tests/data_channel_test.rs @@ -1,9 +1,11 @@ -#![allow(unused_imports)] -use crate::common::test_rooms; -use anyhow::{anyhow, Result}; -use livekit::{DataPacket, RoomEvent, SimulateScenario}; -use std::{sync::Arc, time::Duration}; -use tokio::{sync::oneshot, time}; +#[cfg(feature = "__lk-e2e-test")] +use { + crate::common::test_rooms, + anyhow::{anyhow, Result}, + livekit::{DataPacket, RoomEvent, SimulateScenario}, + std::{sync::Arc, time::Duration}, + tokio::{sync::oneshot, time} +}; mod common; diff --git a/livekit/tests/data_stream_test.rs b/livekit/tests/data_stream_test.rs index f189f8ff3..5540fa8ce 100644 --- a/livekit/tests/data_stream_test.rs +++ b/livekit/tests/data_stream_test.rs @@ -1,12 +1,15 @@ -#![allow(unused_imports)] -use crate::common::test_rooms; -use anyhow::{anyhow, Context, Ok, Result}; -use chrono::{TimeDelta, Utc}; -use livekit::{ - OperationType, RoomEvent, StreamByteOptions, StreamReader, StreamTextOptions, TextStreamInfo, +#[cfg(feature = "__lk-e2e-test")] +use { + crate::common::test_rooms, + anyhow::{anyhow, Context, Ok, Result}, + chrono::{TimeDelta, Utc}, + livekit::{ + OperationType, RoomEvent, StreamByteOptions, StreamReader, StreamTextOptions, + TextStreamInfo, + }, + std::{sync::Mutex, time::Duration}, + tokio::{time::timeout, try_join}, }; -use std::{sync::Mutex, time::Duration}; -use tokio::{time::timeout, try_join}; mod common; From d621a50c0f6454a45a16e021dc5f771dfa5046a3 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:56:39 +1000 Subject: [PATCH 05/13] Define FFI messages for send bytes --- livekit-ffi/protocol/data_stream.proto | 22 +++++++++++ livekit-ffi/protocol/ffi.proto | 9 ++++- livekit-ffi/src/livekit.proto.rs | 51 ++++++++++++++++++++++++-- 3 files changed, 77 insertions(+), 5 deletions(-) diff --git a/livekit-ffi/protocol/data_stream.proto b/livekit-ffi/protocol/data_stream.proto index 0b137c447..bc1076ec4 100644 --- a/livekit-ffi/protocol/data_stream.proto +++ b/livekit-ffi/protocol/data_stream.proto @@ -156,6 +156,28 @@ message StreamSendFileCallback { } } +// MARK: - Send bytes + +// Sends bytes over a data stream. +message StreamSendBytesRequest { + required uint64 local_participant_handle = 1; + + required StreamByteOptions options = 2; + + // Bytes to send. + required bytes bytes = 3; +} +message StreamSendBytesResponse { + required uint64 async_id = 1; +} +message StreamSendBytesCallback { + required uint64 async_id = 1; + oneof result { + ByteStreamInfo info = 2; + StreamError error = 3; + } +} + // MARK: - Send text // Sends text over a data stream. diff --git a/livekit-ffi/protocol/ffi.proto b/livekit-ffi/protocol/ffi.proto index 7e58123d4..f1bc8873a 100644 --- a/livekit-ffi/protocol/ffi.proto +++ b/livekit-ffi/protocol/ffi.proto @@ -148,7 +148,9 @@ message FfiRequest { TextStreamWriterWriteRequest text_stream_write = 65; TextStreamWriterCloseRequest text_stream_close = 66; - // NEXT_ID: 67 + StreamSendBytesRequest send_bytes = 67; + + // NEXT_ID: 68 } } @@ -243,7 +245,9 @@ message FfiResponse { TextStreamWriterWriteResponse text_stream_write = 64; TextStreamWriterCloseResponse text_stream_close = 65; - // NEXT_ID: 66 + StreamSendBytesResponse send_bytes = 66; + + // NEXT_ID: 67 } } @@ -298,6 +302,7 @@ message FfiEvent { TextStreamWriterWriteCallback text_stream_writer_write = 38; TextStreamWriterCloseCallback text_stream_writer_close = 39; StreamSendTextCallback send_text = 40; + StreamSendBytesCallback send_bytes = 41; } } diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index 48bf8dda6..f898ac284 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -2447,6 +2447,45 @@ pub mod stream_send_file_callback { Error(super::StreamError), } } +// MARK: - Send bytes + +/// Sends bytes over a data stream. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StreamSendBytesRequest { + #[prost(uint64, required, tag="1")] + pub local_participant_handle: u64, + #[prost(message, required, tag="2")] + pub options: StreamByteOptions, + /// Bytes to send. + #[prost(bytes="vec", required, tag="3")] + pub bytes: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StreamSendBytesResponse { + #[prost(uint64, required, tag="1")] + pub async_id: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StreamSendBytesCallback { + #[prost(uint64, required, tag="1")] + pub async_id: u64, + #[prost(oneof="stream_send_bytes_callback::Result", tags="2, 3")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `StreamSendBytesCallback`. +pub mod stream_send_bytes_callback { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Result { + #[prost(message, tag="2")] + Info(super::ByteStreamInfo), + #[prost(message, tag="3")] + Error(super::StreamError), + } +} // MARK: - Send text /// Sends text over a data stream. @@ -4889,7 +4928,7 @@ pub struct RpcMethodInvocationEvent { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiRequest { - #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 48, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66")] + #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 48, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiRequest`. @@ -5037,13 +5076,15 @@ pub mod ffi_request { TextStreamWrite(super::TextStreamWriterWriteRequest), #[prost(message, tag="66")] TextStreamClose(super::TextStreamWriterCloseRequest), + #[prost(message, tag="67")] + SendBytes(super::StreamSendBytesRequest), } } /// This is the output of livekit_ffi_request function. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiResponse { - #[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 47, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65")] + #[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 47, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiResponse`. @@ -5189,6 +5230,8 @@ pub mod ffi_response { TextStreamWrite(super::TextStreamWriterWriteResponse), #[prost(message, tag="65")] TextStreamClose(super::TextStreamWriterCloseResponse), + #[prost(message, tag="66")] + SendBytes(super::StreamSendBytesResponse), } } /// To minimize complexity, participant events are not included in the protocol. @@ -5197,7 +5240,7 @@ pub mod ffi_response { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiEvent { - #[prost(oneof="ffi_event::Message", tags="1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40")] + #[prost(oneof="ffi_event::Message", tags="1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiEvent`. @@ -5285,6 +5328,8 @@ pub mod ffi_event { TextStreamWriterClose(super::TextStreamWriterCloseCallback), #[prost(message, tag="40")] SendText(super::StreamSendTextCallback), + #[prost(message, tag="41")] + SendBytes(super::StreamSendBytesCallback), } } /// Stop all rooms synchronously (Do we need async here?). From dce5aa794c002fa8d2a1fb5a72a49bde38c14f4a Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:58:17 +1000 Subject: [PATCH 06/13] Implement FFI bindings --- livekit-ffi/src/server/participant.rs | 20 ++++++++++++++++++++ livekit-ffi/src/server/requests.rs | 12 ++++++++++++ 2 files changed, 32 insertions(+) diff --git a/livekit-ffi/src/server/participant.rs b/livekit-ffi/src/server/participant.rs index 5b04954b1..adadae88d 100644 --- a/livekit-ffi/src/server/participant.rs +++ b/livekit-ffi/src/server/participant.rs @@ -177,6 +177,26 @@ impl FfiParticipant { Ok(proto::StreamSendTextResponse { async_id }) } + pub fn send_bytes( + &self, + server: &'static FfiServer, + request: proto::StreamSendBytesRequest, + ) -> FfiResult { + let async_id = server.next_id(); + let local = self.guard_local_participant()?; + + let handle = server.async_runtime.spawn(async move { + let result = match local.send_bytes(&request.bytes, request.options.into()).await { + Ok(info) => proto::stream_send_bytes_callback::Result::Info(info.into()), + Err(err) => proto::stream_send_bytes_callback::Result::Error(err.into()), + }; + let callback = proto::StreamSendBytesCallback { async_id, result: Some(result) }; + let _ = server.send_event(proto::ffi_event::Message::SendBytes(callback)); + }); + server.watch_panic(handle); + Ok(proto::StreamSendBytesResponse { async_id }) + } + pub fn stream_bytes( &self, server: &'static FfiServer, diff --git a/livekit-ffi/src/server/requests.rs b/livekit-ffi/src/server/requests.rs index c45dba855..21d868b7a 100644 --- a/livekit-ffi/src/server/requests.rs +++ b/livekit-ffi/src/server/requests.rs @@ -1100,6 +1100,15 @@ fn on_send_file( ffi_participant.send_file(server, request) } +fn on_send_bytes( + server: &'static FfiServer, + request: proto::StreamSendBytesRequest, +) -> FfiResult { + let ffi_participant = + server.retrieve_handle::(request.local_participant_handle)?.clone(); + ffi_participant.send_bytes(server, request) +} + fn on_send_text( server: &'static FfiServer, request: proto::StreamSendTextRequest, @@ -1383,6 +1392,9 @@ pub fn handle_request( proto::ffi_request::Message::SendFile(request) => { proto::ffi_response::Message::SendFile(on_send_file(server, request)?) } + proto::ffi_request::Message::SendBytes(request) => { + proto::ffi_response::Message::SendBytes(on_send_bytes(server, request)?) + } proto::ffi_request::Message::SendText(request) => { proto::ffi_response::Message::SendText(on_send_text(server, request)?) } From 0d615e0473479330076795f15ea04f165f31da24 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:58:39 +1000 Subject: [PATCH 07/13] Add README for FFI crate --- livekit-ffi/Cargo.toml | 1 + livekit-ffi/README.md | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 livekit-ffi/README.md diff --git a/livekit-ffi/Cargo.toml b/livekit-ffi/Cargo.toml index 5b6857f3a..dc56ae659 100644 --- a/livekit-ffi/Cargo.toml +++ b/livekit-ffi/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "Apache-2.0" description = "FFI interface for bindings in other languages" repository = "https://github.com/livekit/rust-sdks" +readme = "README.md" [features] default = ["rustls-tls-native-roots"] diff --git a/livekit-ffi/README.md b/livekit-ffi/README.md new file mode 100644 index 000000000..fd4d98b58 --- /dev/null +++ b/livekit-ffi/README.md @@ -0,0 +1,9 @@ +# LiveKit FFI + +Foreign function interface (FFI) bindings for LiveKit, used to support the following client SDKs: + +- [Python](https://github.com/livekit/python-sdks) +- [NodeJS](https://github.com/livekit/node-sdks) +- [Unity](https://github.com/livekit/client-sdk-unity) + +This crate is compiled as dynamic library, allowing client languages to invoke APIs from the core [_livekit_](https://crates.io/crates/livekit) crate. From 7f8af2292c816050a0302fbbcb92fd2c098e4965 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 10 Sep 2025 19:30:36 +1000 Subject: [PATCH 08/13] Create example for send bytes --- examples/send_bytes/Cargo.lock | 3082 +++++++++++++++++++++++++++++ examples/send_bytes/Cargo.toml | 15 + examples/send_bytes/README.md | 43 + examples/send_bytes/src/main.rs | 76 + examples/send_bytes/src/packet.rs | 56 + 5 files changed, 3272 insertions(+) create mode 100644 examples/send_bytes/Cargo.lock create mode 100644 examples/send_bytes/Cargo.toml create mode 100644 examples/send_bytes/README.md create mode 100644 examples/send_bytes/src/main.rs create mode 100644 examples/send_bytes/src/packet.rs diff --git a/examples/send_bytes/Cargo.lock b/examples/send_bytes/Cargo.lock new file mode 100644 index 000000000..a957f3e22 --- /dev/null +++ b/examples/send_bytes/Cargo.lock @@ -0,0 +1,3082 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.5.0", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + +[[package]] +name = "async-io" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.0.8", + "slab", + "windows-sys 0.60.2", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.4.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-native-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec" +dependencies = [ + "futures-util", + "native-tls", + "thiserror", + "url", +] + +[[package]] +name = "async-std" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io", + "async-lock", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-tungstenite" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cca750b12e02c389c1694d35c16539f88b8bbaa5945934fdc1b41a776688589" +dependencies = [ + "async-native-tls", + "async-std", + "futures-io", + "futures-util", + "log", + "pin-project-lite", + "tungstenite 0.21.0", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitfield-struct" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3ca019570363e800b05ad4fd890734f28ac7b72f563ad8a35079efb793616f8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel 2.5.0", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bmrng" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54df9073108f1558f90ae6c5bf5ab9c917c4185f5527b280c87a993cbead0ac" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "bumpalo" +version = "3.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c764d619ca78fccbf3069b37bd7af92577f044bb15236036662d79b6559f25b7" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.6", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "colored" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cxx" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c15f3b597018782655a05d417f28bac009f6eb60f4b6703eb818998c1aaa16a" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81699747d109bba60bd6f87e7cb24b626824b8427b32f199b95c7faa06ee3dc9" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a7eb4c4fd18505f5a935f9c2ee77780350dcdb56da7cd037634e806141c5c43" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d914fcc6452d133236ee067a9538be25ba6a644a450e1a6c617da84bf029854" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "deranged" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener 5.4.0", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.11", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.11", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.11", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jiff" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64", + "js-sys", + "ring", + "serde", + "serde_json", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libwebrtc" +version = "0.3.14" +dependencies = [ + "cxx", + "jni", + "js-sys", + "lazy_static", + "livekit-protocol", + "livekit-runtime", + "log", + "parking_lot", + "serde", + "serde_json", + "thiserror", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webrtc-sys", +] + +[[package]] +name = "link-cplusplus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +dependencies = [ + "cc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "livekit" +version = "0.7.18" +dependencies = [ + "bmrng", + "bytes", + "chrono", + "futures-util", + "lazy_static", + "libloading", + "libwebrtc", + "livekit-api", + "livekit-protocol", + "livekit-runtime", + "log", + "parking_lot", + "prost", + "semver", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "livekit-api" +version = "0.4.6" +dependencies = [ + "async-tungstenite", + "base64", + "futures-util", + "http 0.2.11", + "jsonwebtoken", + "livekit-protocol", + "livekit-runtime", + "log", + "parking_lot", + "pbjson-types", + "prost", + "rand 0.9.2", + "reqwest", + "scopeguard", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tokio-tungstenite", + "url", +] + +[[package]] +name = "livekit-protocol" +version = "0.4.0" +dependencies = [ + "futures-util", + "livekit-runtime", + "parking_lot", + "pbjson", + "pbjson-types", + "prost", + "prost-types", + "serde", + "thiserror", + "tokio", +] + +[[package]] +name = "livekit-runtime" +version = "0.4.0" +dependencies = [ + "tokio", + "tokio-stream", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +dependencies = [ + "value-bag", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +dependencies = [ + "base64", + "serde", +] + +[[package]] +name = "pbjson-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +dependencies = [ + "heck", + "itertools", + "prost", + "prost-types", +] + +[[package]] +name = "pbjson-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +dependencies = [ + "bytes", + "chrono", + "pbjson", + "pbjson-build", + "prost", + "prost-build", + "serde", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "polling" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee9b2fa7a4517d2c91ff5bc6c297a427a96749d15f98fcdbb22c05571a4d4b7" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.0.8", + "windows-sys 0.60.2", +] + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +dependencies = [ + "bytes", + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.12", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "reqwest" +version = "0.11.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http 0.2.11", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.12", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys 0.9.4", + "windows-sys 0.60.2", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scratch" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "send_bytes" +version = "0.1.0" +dependencies = [ + "bitfield-struct", + "colored", + "env_logger", + "livekit", + "log", + "rand 0.9.2", + "tokio", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.143" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +dependencies = [ + "cfg-if", + "fastrand", + "rustix 0.38.44", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.3.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2 0.6.0", + "tokio-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "native-tls", + "tokio", + "tokio-native-tls", + "tungstenite 0.20.1", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.11", + "httparse", + "log", + "native-tls", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.3.1", + "httparse", + "log", + "native-tls", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "value-bag" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" + +[[package]] +name = "web-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webrtc-sys" +version = "0.3.11" +dependencies = [ + "cc", + "cxx", + "cxx-build", + "glob", + "log", + "webrtc-sys-build", +] + +[[package]] +name = "webrtc-sys-build" +version = "0.3.7" +dependencies = [ + "anyhow", + "fs2", + "regex", + "reqwest", + "scratch", + "semver", + "zip", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/examples/send_bytes/Cargo.toml b/examples/send_bytes/Cargo.toml new file mode 100644 index 000000000..f80f11521 --- /dev/null +++ b/examples/send_bytes/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "send_bytes" +version = "0.1.0" +edition = "2024" + +[dependencies] +tokio = { version = "1.47.1", features = ["full"] } +livekit = { path = "../../livekit", features = ["native-tls"] } +log = "0.4.28" +env_logger = "0.11.8" +bitfield-struct = "0.11.0" +rand = "0.9.2" +colored = "3.0.0" + +[workspace] \ No newline at end of file diff --git a/examples/send_bytes/README.md b/examples/send_bytes/README.md new file mode 100644 index 000000000..11cfaca5a --- /dev/null +++ b/examples/send_bytes/README.md @@ -0,0 +1,43 @@ +# Send Bytes + +Example demonstrating the `send_bytes` method for sending a custom packet to participants in a room. + +## Usage + +1. Run the example in sender mode: + +```sh +export LIVEKIT_URL="..." +export LIVEKIT_TOKEN="" +cargo run -- sender +``` + +2. In a second terminal, run the example in receiver mode: + +```sh +export LIVEKIT_URL="..." +export LIVEKIT_TOKEN="" +cargo run +``` + +## Custom Packet + +This example uses the following hypothetical 4-byte packet structure to teleoperate 16 discrete LED indicators by setting their power states and RGB values: + +```mermaid +--- +title: "LED Control Packet" +config: + packet: + bitsPerRow: 8 +--- +packet ++2: "Version" ++5: "Channel" ++1: "On" ++8: "Red" ++8: "Green" ++8: "Blue" +``` + +The [_bitfield-struct_](https://crates.io/crates/bitfield-struct) crate is used to create a type-safe wrapper for getting and setting the bitfields by name. diff --git a/examples/send_bytes/src/main.rs b/examples/send_bytes/src/main.rs new file mode 100644 index 000000000..dd7448d22 --- /dev/null +++ b/examples/send_bytes/src/main.rs @@ -0,0 +1,76 @@ +use livekit::{Room, RoomEvent, RoomOptions, StreamByteOptions, StreamReader}; +use packet::LedControlPacket; +use rand::Rng; +use std::{env, error::Error, time::Duration}; +use tokio::{sync::mpsc::UnboundedReceiver, time::sleep}; + +mod packet; + +const LED_CONTROL_TOPIC: &str = "led-control"; + +#[tokio::main] +async fn main() -> Result<(), Box> { + env_logger::init(); + + let url = env::var("LIVEKIT_URL").expect("LIVEKIT_URL is not set"); + let token = env::var("LIVEKIT_TOKEN").expect("LIVEKIT_TOKEN is not set"); + + let is_sender = env::args().nth(1).map_or(false, |arg| arg == "sender"); + + let (room, rx) = Room::connect(&url, &token, RoomOptions::default()).await?; + println!("Connected to room: {} - {}", room.name(), room.sid().await); + + if is_sender { run_sender(room).await } else { run_receiver(room, rx).await } +} + +async fn run_sender(room: Room) -> Result<(), Box> { + println!("Running as sender"); + let mut rng = rand::rng(); + + loop { + // Send control packets with randomized channel and color. + let packet = packet::LedControlPacket::new() + .with_version(1) + .with_channel(rng.random_range(0..16)) + .with_is_on(true) + .with_red(rng.random()) + .with_green(rng.random()) + .with_blue(rng.random()); + + println!("[tx] {}", packet); + + let options = StreamByteOptions { topic: LED_CONTROL_TOPIC.into(), ..Default::default() }; + let be_bytes = packet.into_bits().to_be_bytes(); + room.local_participant().send_bytes(&be_bytes, options).await?; + + sleep(Duration::from_millis(500)).await; + } +} + +async fn run_receiver( + _room: Room, + mut rx: UnboundedReceiver, +) -> Result<(), Box> { + println!("Running as receiver"); + println!("Waiting for LED control packets…"); + while let Some(event) = rx.recv().await { + match event { + RoomEvent::ByteStreamOpened { reader, topic, participant_identity: _ } => { + if topic != LED_CONTROL_TOPIC { + continue; + }; + let Some(reader) = reader.take() else { continue }; + + let Ok(be_bytes) = reader.read_all().await?[..4].try_into() else { + log::warn!("Unexpected packet length"); + continue; + }; + let packet = LedControlPacket::from(u32::from_be_bytes(be_bytes)); + + println!("[rx] {}", packet); + } + _ => {} + } + } + Ok(()) +} diff --git a/examples/send_bytes/src/packet.rs b/examples/send_bytes/src/packet.rs new file mode 100644 index 000000000..efe727c99 --- /dev/null +++ b/examples/send_bytes/src/packet.rs @@ -0,0 +1,56 @@ +use bitfield_struct::bitfield; +use colored::Colorize; +use std::fmt::Display; + +/// Custom 4-byte packet structure used for controlling LED +/// state through a LiveKit room. +#[bitfield(u32)] +pub struct LedControlPacket { + /// Packet version (0-4). + #[bits(2)] + pub version: u8, + /// Which LED is being controlled (0-15). + #[bits(5)] + pub channel: u8, + /// Whether or not the channel is on. + #[bits(1)] + pub is_on: bool, + /// Red intensity (0-255). + #[bits(8)] + pub red: u8, + /// Green intensity (0-255). + #[bits(8)] + pub green: u8, + /// Blue intensity (0-255). + #[bits(8)] + pub blue: u8, +} + +impl Display for LedControlPacket { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let color_display = if colored::control::SHOULD_COLORIZE.should_colorize() { + " ".on_truecolor(self.red(), self.green(), self.blue()) + } else { + // Display RGB value if terminal color is disabled. + format!("rgb({:>3}, {:>3}, {:>3})", self.red(), self.green(), self.blue()).into() + }; + write!(f, "Channel {:02} => {}", self.channel(), color_display) + } +} + +#[cfg(test)] +mod tests { + use super::LedControlPacket; + + #[test] + fn test_bit_representation() { + let packet = LedControlPacket::new() + .with_version(1) + .with_channel(4) + .with_is_on(true) + .with_red(31) + .with_green(213) + .with_blue(249); + assert_eq!(packet.into_bits(), 0xF9D51F91); + } +} From 4fc0027daa5ac76c5ef73ab32c5716e21bbe15eb Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Fri, 12 Sep 2025 08:54:34 +1000 Subject: [PATCH 09/13] Update protocol submodule --- livekit-protocol/protocol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index b047e92f0..2bc93ddc2 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit b047e92f055de744e5a5293848830cd803f3217b +Subproject commit 2bc93ddc27ccfa66ee8d270a1bcd115586fb601d From 9b5ecf9d2168b7c4cd782a9742b1a88113ddba72 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Fri, 12 Sep 2025 09:05:50 +1000 Subject: [PATCH 10/13] Wip: use 'push' for send_bytes and send_text --- examples/send_bytes/src/main.rs | 9 ++-- livekit/src/room/data_stream/outgoing.rs | 12 +++-- livekit/src/room/mod.rs | 66 ++++++++++++++++++++---- livekit/tests/data_stream_test.rs | 20 +++---- 4 files changed, 71 insertions(+), 36 deletions(-) diff --git a/examples/send_bytes/src/main.rs b/examples/send_bytes/src/main.rs index dd7448d22..ec1d4265f 100644 --- a/examples/send_bytes/src/main.rs +++ b/examples/send_bytes/src/main.rs @@ -55,18 +55,15 @@ async fn run_receiver( println!("Waiting for LED control packets…"); while let Some(event) = rx.recv().await { match event { - RoomEvent::ByteStreamOpened { reader, topic, participant_identity: _ } => { - if topic != LED_CONTROL_TOPIC { + RoomEvent::BytesReceived { bytes, info, participant_identity: _ } => { + if info.topic != LED_CONTROL_TOPIC { continue; }; - let Some(reader) = reader.take() else { continue }; - - let Ok(be_bytes) = reader.read_all().await?[..4].try_into() else { + let Ok(be_bytes) = bytes[..4].try_into() else { log::warn!("Unexpected packet length"); continue; }; let packet = LedControlPacket::from(u32::from_be_bytes(be_bytes)); - println!("[rx] {}", packet); } _ => {} diff --git a/livekit/src/room/data_stream/outgoing.rs b/livekit/src/room/data_stream/outgoing.rs index cfe8b6a13..a98c608f2 100644 --- a/livekit/src/room/data_stream/outgoing.rs +++ b/livekit/src/room/data_stream/outgoing.rs @@ -348,7 +348,7 @@ impl OutgoingStreamManager { pub async fn send_text( &self, text: &str, - options: StreamTextOptions, + mut options: StreamTextOptions, ) -> StreamResult { let text_header = proto::data_stream::TextHeader { operation_type: options.operation_type.unwrap_or_default() as i32, @@ -357,6 +357,8 @@ impl OutgoingStreamManager { attached_stream_ids: options.attached_stream_ids, generated: options.generated.unwrap_or_default(), }; + + options.attributes.insert("__push".to_owned(), "1".into()); let header = proto::data_stream::Header { stream_id: options.id.unwrap_or_else(|| create_random_uuid()), timestamp: Utc::now().timestamp_millis(), @@ -397,13 +399,13 @@ impl OutgoingStreamManager { pub async fn send_bytes( &self, data: impl AsRef<[u8]>, - options: StreamByteOptions, + mut options: StreamByteOptions, ) -> StreamResult { let bytes = data.as_ref(); - let byte_header = proto::data_stream::ByteHeader { - name: options.name.unwrap_or_default(), - }; + let byte_header = proto::data_stream::ByteHeader { name: options.name.unwrap_or_default() }; + + options.attributes.insert("__push".to_owned(), "1".into()); let header = proto::data_stream::Header { stream_id: options.id.unwrap_or_else(|| create_random_uuid()), timestamp: Utc::now().timestamp_millis(), diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index de72cb808..420d2e0d4 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -13,6 +13,7 @@ // limitations under the License. use bmrng::unbounded::UnboundedRequestReceiver; +use bytes::Bytes; use libwebrtc::{ native::frame_cryptor::EncryptionState, prelude::{ @@ -186,6 +187,20 @@ pub enum RoomEvent { topic: String, participant_identity: ParticipantIdentity, }, + /// A byte buffer has been fully received from a remove participant + /// sent using [`LocalParticipant::send_bytes`]. + BytesReceived { + bytes: Bytes, + info: ByteStreamInfo, + participant_identity: ParticipantIdentity, + }, + /// A string has been fully received from a remove participant + /// sent using [`LocalParticipant::send_text`]. + TextReceived { + text: String, + info: TextStreamInfo, + participant_identity: ParticipantIdentity, + }, #[deprecated(note = "Use high-level data streams API instead.")] StreamHeaderReceived { header: proto::data_stream::Header, @@ -1701,17 +1716,8 @@ async fn incoming_data_stream_task( loop { tokio::select! { Some((reader, identity)) = open_rx.recv() => { - match reader { - AnyStreamReader::Byte(reader) => dispatcher.dispatch(&RoomEvent::ByteStreamOpened { - topic: reader.info().topic.clone(), - reader: TakeCell::new(reader), - participant_identity: ParticipantIdentity(identity) - }), - AnyStreamReader::Text(reader) => dispatcher.dispatch(&RoomEvent::TextStreamOpened { - topic: reader.info().topic.clone(), - reader: TakeCell::new(reader), - participant_identity: ParticipantIdentity(identity) - }), + if let Some(event) = event_for_incoming_stream(reader, identity).await { + dispatcher.dispatch(&event) } }, _ = close_rx.recv() => { @@ -1721,6 +1727,44 @@ async fn incoming_data_stream_task( } } +async fn event_for_incoming_stream(reader: AnyStreamReader, identity: String) -> Option { + let participant_identity = ParticipantIdentity(identity); + match reader { + AnyStreamReader::Byte(reader) => { + if reader.info().attributes.contains_key("__push") { + // TODO: avoid cloning info + let info = reader.info().clone(); + let Ok(bytes) = reader.read_all().await else { + log::error!("Failed to read pushed bytes for stream '{}'", info.id); + return None; + }; + return Some(RoomEvent::BytesReceived { bytes, info, participant_identity }); + } + Some(RoomEvent::ByteStreamOpened { + topic: reader.info().topic.clone(), + reader: TakeCell::new(reader), + participant_identity, + }) + } + AnyStreamReader::Text(reader) => { + if reader.info().attributes.contains_key("__push") { + // TODO: avoid cloning info + let info = reader.info().clone(); + let Ok(text) = reader.read_all().await else { + log::error!("Failed to read pushed text for stream '{}'", info.id); + return None; + }; + return Some(RoomEvent::TextReceived { text, info, participant_identity }); + } + Some(RoomEvent::TextStreamOpened { + topic: reader.info().topic.clone(), + reader: TakeCell::new(reader), + participant_identity, + }) + } + } +} + /// Receives packets from the outgoing stream manager and send them. async fn outgoing_data_stream_task( mut packet_rx: UnboundedRequestReceiver>, diff --git a/livekit/tests/data_stream_test.rs b/livekit/tests/data_stream_test.rs index 5540fa8ce..05562e645 100644 --- a/livekit/tests/data_stream_test.rs +++ b/livekit/tests/data_stream_test.rs @@ -40,16 +40,12 @@ async fn test_send_bytes() -> Result<()> { }; let receive_text = async move { while let Some(event) = receiving_event_rx.recv().await { - let RoomEvent::ByteStreamOpened { reader, topic, participant_identity } = event else { + let RoomEvent::BytesReceived { bytes, info, participant_identity } = event else { continue; }; - assert_eq!(topic, "some-topic"); + assert_eq!(info.topic, "some-topic"); assert_eq!(participant_identity, sender_identity); - - let Some(reader) = reader.take() else { - return Err(anyhow!("Failed to take reader")); - }; - assert_eq!(reader.read_all().await?, BYTES_TO_SEND); + assert_eq!(bytes, BYTES_TO_SEND); break; } Ok(()) @@ -85,16 +81,12 @@ async fn test_send_text() -> Result<()> { }; let receive_text = async move { while let Some(event) = receiving_event_rx.recv().await { - let RoomEvent::TextStreamOpened { reader, topic, participant_identity } = event else { + let RoomEvent::TextReceived { text, info, participant_identity } = event else { continue; }; - assert_eq!(topic, "some-topic"); + assert_eq!(info.topic, "some-topic"); assert_eq!(participant_identity, sender_identity); - - let Some(reader) = reader.take() else { - return Err(anyhow!("Failed to take reader")); - }; - assert_eq!(reader.read_all().await?, TEXT_TO_SEND); + assert_eq!(text, TEXT_TO_SEND); break; } Ok(()) From 40e89050042874f308a5bcc10e63531128499d6c Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 17 Sep 2025 07:45:23 +1000 Subject: [PATCH 11/13] Revert "Wip: use 'push' for send_bytes and send_text" This reverts commit 9b5ecf9d2168b7c4cd782a9742b1a88113ddba72. --- examples/send_bytes/src/main.rs | 9 ++-- livekit/src/room/data_stream/outgoing.rs | 12 ++--- livekit/src/room/mod.rs | 66 ++++-------------------- livekit/tests/data_stream_test.rs | 20 ++++--- 4 files changed, 36 insertions(+), 71 deletions(-) diff --git a/examples/send_bytes/src/main.rs b/examples/send_bytes/src/main.rs index ec1d4265f..dd7448d22 100644 --- a/examples/send_bytes/src/main.rs +++ b/examples/send_bytes/src/main.rs @@ -55,15 +55,18 @@ async fn run_receiver( println!("Waiting for LED control packets…"); while let Some(event) = rx.recv().await { match event { - RoomEvent::BytesReceived { bytes, info, participant_identity: _ } => { - if info.topic != LED_CONTROL_TOPIC { + RoomEvent::ByteStreamOpened { reader, topic, participant_identity: _ } => { + if topic != LED_CONTROL_TOPIC { continue; }; - let Ok(be_bytes) = bytes[..4].try_into() else { + let Some(reader) = reader.take() else { continue }; + + let Ok(be_bytes) = reader.read_all().await?[..4].try_into() else { log::warn!("Unexpected packet length"); continue; }; let packet = LedControlPacket::from(u32::from_be_bytes(be_bytes)); + println!("[rx] {}", packet); } _ => {} diff --git a/livekit/src/room/data_stream/outgoing.rs b/livekit/src/room/data_stream/outgoing.rs index a98c608f2..cfe8b6a13 100644 --- a/livekit/src/room/data_stream/outgoing.rs +++ b/livekit/src/room/data_stream/outgoing.rs @@ -348,7 +348,7 @@ impl OutgoingStreamManager { pub async fn send_text( &self, text: &str, - mut options: StreamTextOptions, + options: StreamTextOptions, ) -> StreamResult { let text_header = proto::data_stream::TextHeader { operation_type: options.operation_type.unwrap_or_default() as i32, @@ -357,8 +357,6 @@ impl OutgoingStreamManager { attached_stream_ids: options.attached_stream_ids, generated: options.generated.unwrap_or_default(), }; - - options.attributes.insert("__push".to_owned(), "1".into()); let header = proto::data_stream::Header { stream_id: options.id.unwrap_or_else(|| create_random_uuid()), timestamp: Utc::now().timestamp_millis(), @@ -399,13 +397,13 @@ impl OutgoingStreamManager { pub async fn send_bytes( &self, data: impl AsRef<[u8]>, - mut options: StreamByteOptions, + options: StreamByteOptions, ) -> StreamResult { let bytes = data.as_ref(); - let byte_header = proto::data_stream::ByteHeader { name: options.name.unwrap_or_default() }; - - options.attributes.insert("__push".to_owned(), "1".into()); + let byte_header = proto::data_stream::ByteHeader { + name: options.name.unwrap_or_default(), + }; let header = proto::data_stream::Header { stream_id: options.id.unwrap_or_else(|| create_random_uuid()), timestamp: Utc::now().timestamp_millis(), diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index 420d2e0d4..de72cb808 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -13,7 +13,6 @@ // limitations under the License. use bmrng::unbounded::UnboundedRequestReceiver; -use bytes::Bytes; use libwebrtc::{ native::frame_cryptor::EncryptionState, prelude::{ @@ -187,20 +186,6 @@ pub enum RoomEvent { topic: String, participant_identity: ParticipantIdentity, }, - /// A byte buffer has been fully received from a remove participant - /// sent using [`LocalParticipant::send_bytes`]. - BytesReceived { - bytes: Bytes, - info: ByteStreamInfo, - participant_identity: ParticipantIdentity, - }, - /// A string has been fully received from a remove participant - /// sent using [`LocalParticipant::send_text`]. - TextReceived { - text: String, - info: TextStreamInfo, - participant_identity: ParticipantIdentity, - }, #[deprecated(note = "Use high-level data streams API instead.")] StreamHeaderReceived { header: proto::data_stream::Header, @@ -1716,8 +1701,17 @@ async fn incoming_data_stream_task( loop { tokio::select! { Some((reader, identity)) = open_rx.recv() => { - if let Some(event) = event_for_incoming_stream(reader, identity).await { - dispatcher.dispatch(&event) + match reader { + AnyStreamReader::Byte(reader) => dispatcher.dispatch(&RoomEvent::ByteStreamOpened { + topic: reader.info().topic.clone(), + reader: TakeCell::new(reader), + participant_identity: ParticipantIdentity(identity) + }), + AnyStreamReader::Text(reader) => dispatcher.dispatch(&RoomEvent::TextStreamOpened { + topic: reader.info().topic.clone(), + reader: TakeCell::new(reader), + participant_identity: ParticipantIdentity(identity) + }), } }, _ = close_rx.recv() => { @@ -1727,44 +1721,6 @@ async fn incoming_data_stream_task( } } -async fn event_for_incoming_stream(reader: AnyStreamReader, identity: String) -> Option { - let participant_identity = ParticipantIdentity(identity); - match reader { - AnyStreamReader::Byte(reader) => { - if reader.info().attributes.contains_key("__push") { - // TODO: avoid cloning info - let info = reader.info().clone(); - let Ok(bytes) = reader.read_all().await else { - log::error!("Failed to read pushed bytes for stream '{}'", info.id); - return None; - }; - return Some(RoomEvent::BytesReceived { bytes, info, participant_identity }); - } - Some(RoomEvent::ByteStreamOpened { - topic: reader.info().topic.clone(), - reader: TakeCell::new(reader), - participant_identity, - }) - } - AnyStreamReader::Text(reader) => { - if reader.info().attributes.contains_key("__push") { - // TODO: avoid cloning info - let info = reader.info().clone(); - let Ok(text) = reader.read_all().await else { - log::error!("Failed to read pushed text for stream '{}'", info.id); - return None; - }; - return Some(RoomEvent::TextReceived { text, info, participant_identity }); - } - Some(RoomEvent::TextStreamOpened { - topic: reader.info().topic.clone(), - reader: TakeCell::new(reader), - participant_identity, - }) - } - } -} - /// Receives packets from the outgoing stream manager and send them. async fn outgoing_data_stream_task( mut packet_rx: UnboundedRequestReceiver>, diff --git a/livekit/tests/data_stream_test.rs b/livekit/tests/data_stream_test.rs index 05562e645..5540fa8ce 100644 --- a/livekit/tests/data_stream_test.rs +++ b/livekit/tests/data_stream_test.rs @@ -40,12 +40,16 @@ async fn test_send_bytes() -> Result<()> { }; let receive_text = async move { while let Some(event) = receiving_event_rx.recv().await { - let RoomEvent::BytesReceived { bytes, info, participant_identity } = event else { + let RoomEvent::ByteStreamOpened { reader, topic, participant_identity } = event else { continue; }; - assert_eq!(info.topic, "some-topic"); + assert_eq!(topic, "some-topic"); assert_eq!(participant_identity, sender_identity); - assert_eq!(bytes, BYTES_TO_SEND); + + let Some(reader) = reader.take() else { + return Err(anyhow!("Failed to take reader")); + }; + assert_eq!(reader.read_all().await?, BYTES_TO_SEND); break; } Ok(()) @@ -81,12 +85,16 @@ async fn test_send_text() -> Result<()> { }; let receive_text = async move { while let Some(event) = receiving_event_rx.recv().await { - let RoomEvent::TextReceived { text, info, participant_identity } = event else { + let RoomEvent::TextStreamOpened { reader, topic, participant_identity } = event else { continue; }; - assert_eq!(info.topic, "some-topic"); + assert_eq!(topic, "some-topic"); assert_eq!(participant_identity, sender_identity); - assert_eq!(text, TEXT_TO_SEND); + + let Some(reader) = reader.take() else { + return Err(anyhow!("Failed to take reader")); + }; + assert_eq!(reader.read_all().await?, TEXT_TO_SEND); break; } Ok(()) From cbf98e750bd15dd8e36954e7087a93dd2f18f8b4 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Wed, 17 Sep 2025 07:53:02 +1000 Subject: [PATCH 12/13] Format --- livekit/src/room/data_stream/outgoing.rs | 4 +--- livekit/tests/common/mod.rs | 2 +- livekit/tests/data_channel_test.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/livekit/src/room/data_stream/outgoing.rs b/livekit/src/room/data_stream/outgoing.rs index cfe8b6a13..ab5bf6a16 100644 --- a/livekit/src/room/data_stream/outgoing.rs +++ b/livekit/src/room/data_stream/outgoing.rs @@ -401,9 +401,7 @@ impl OutgoingStreamManager { ) -> StreamResult { let bytes = data.as_ref(); - let byte_header = proto::data_stream::ByteHeader { - name: options.name.unwrap_or_default(), - }; + let byte_header = proto::data_stream::ByteHeader { name: options.name.unwrap_or_default() }; let header = proto::data_stream::Header { stream_id: options.id.unwrap_or_else(|| create_random_uuid()), timestamp: Utc::now().timestamp_millis(), diff --git a/livekit/tests/common/mod.rs b/livekit/tests/common/mod.rs index 2c5247768..25c465db0 100644 --- a/livekit/tests/common/mod.rs +++ b/livekit/tests/common/mod.rs @@ -3,4 +3,4 @@ mod e2e; #[cfg(feature = "__lk-e2e-test")] -pub use e2e::*; \ No newline at end of file +pub use e2e::*; diff --git a/livekit/tests/data_channel_test.rs b/livekit/tests/data_channel_test.rs index bb6590a2a..921386f31 100644 --- a/livekit/tests/data_channel_test.rs +++ b/livekit/tests/data_channel_test.rs @@ -4,7 +4,7 @@ use { anyhow::{anyhow, Result}, livekit::{DataPacket, RoomEvent, SimulateScenario}, std::{sync::Arc, time::Duration}, - tokio::{sync::oneshot, time} + tokio::{sync::oneshot, time}, }; mod common; From 2a98c7e66fab3489a1590aa7d53d1f0fe45b5922 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Fri, 19 Sep 2025 10:44:49 +1000 Subject: [PATCH 13/13] Warn if total_length option specified --- livekit/src/room/data_stream/outgoing.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/livekit/src/room/data_stream/outgoing.rs b/livekit/src/room/data_stream/outgoing.rs index ab5bf6a16..5a96888d2 100644 --- a/livekit/src/room/data_stream/outgoing.rs +++ b/livekit/src/room/data_stream/outgoing.rs @@ -399,6 +399,9 @@ impl OutgoingStreamManager { data: impl AsRef<[u8]>, options: StreamByteOptions, ) -> StreamResult { + if options.total_length.is_some() { + log::warn!("Ignoring total_length option specified for send_bytes"); + } let bytes = data.as_ref(); let byte_header = proto::data_stream::ByteHeader { name: options.name.unwrap_or_default() };