Skip to content

Commit

Permalink
Merge pull request #473 from johanhelsing/cargo-update
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
johanhelsing authored Dec 12, 2024
2 parents 1d14fd5 + 44d1d4e commit 0179f4d
Show file tree
Hide file tree
Showing 8 changed files with 896 additions and 813 deletions.
1,649 changes: 866 additions & 783 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion matchbox_protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ json = ["dep:serde_json"]
cfg-if = "1.0"
serde = { version = "1.0", features = ["derive"] }
uuid = { version = "1.4", features = ["serde"] }
derive_more = "0.99"
derive_more = { version = "1.0", features = ["display", "from"] }

# JSON feature
serde_json = { version = "1.0", default-features = false, optional = true }
6 changes: 3 additions & 3 deletions matchbox_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ async-trait = "0.1"
axum = { version = "0.7", features = ["ws"] }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }
tower-http = { version = "0.6", features = ["cors", "trace"] }
tokio = { version = "1.32", features = ["macros", "rt-multi-thread"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
uuid = { version = "1.4", features = ["serde", "v4"] }
clap = { version = "4.3", features = ["derive", "env"] }
thiserror = "1.0"
thiserror = "2.0"
tokio-stream = "0.1"

[dev-dependencies]
tokio-tungstenite = "0.23"
tokio-tungstenite = "0.24"
6 changes: 3 additions & 3 deletions matchbox_signaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ matchbox_protocol = { version = "0.10", path = "../matchbox_protocol", features
axum = { version = "0.7", features = ["ws"] }
hyper = { version = "1.2", features = ["server"] }
tracing = { version = "0.1", features = ["log"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }
tower-http = { version = "0.6", features = ["cors", "trace"] }
tokio = { version = "1.32", features = ["macros", "rt-multi-thread"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
uuid = { version = "1.4", features = ["serde", "v4"] }
thiserror = "1.0"
thiserror = "2.0"
tokio-stream = "0.1"
async-trait = "0.1"

[dev-dependencies]
tokio-tungstenite = "0.23"
tokio-tungstenite = "0.24"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
6 changes: 3 additions & 3 deletions matchbox_socket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ futures-util = { version = "0.3", default-features = false, features = [
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
log = { version = "0.4", default-features = false }
thiserror = "1.0"
thiserror = "2.0"
cfg-if = "1.0"
async-trait = "0.1"
once_cell = { version = "1.17", default-features = false, features = [
"race",
"alloc",
] }
derive_more = "0.99"
derive_more = { version = "1.0", features = ["display", "from"] }

ggrs = { version = "0.10", default-features = false, optional = true }
bincode = { version = "1.3", default-features = false, optional = true }
Expand Down Expand Up @@ -74,7 +74,7 @@ web-sys = { version = "0.3.22", default-features = false, features = [
serde-wasm-bindgen = "0.6"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
async-tungstenite = { version = "0.26", default-features = false, features = [
async-tungstenite = { version = "0.28", default-features = false, features = [
"async-std-runtime",
"async-tls",
] }
Expand Down
2 changes: 1 addition & 1 deletion matchbox_socket/src/webrtc_socket/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cfg_if! {
}

#[derive(Debug, Display)]
#[display(fmt = "{_0:?}")]
#[display("{_0:?}")]
pub struct JsError(JsValue);

impl std::error::Error for JsError {}
Expand Down
2 changes: 1 addition & 1 deletion matchbox_socket/src/webrtc_socket/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use bytes::Bytes;
use futures::{
future::{Fuse, FusedFuture},
stream::FuturesUnordered,
Future, FutureExt, SinkExt, StreamExt,
Future, FutureExt, StreamExt,
};
use futures_channel::mpsc::{Receiver, Sender, TrySendError, UnboundedReceiver, UnboundedSender};
use futures_timer::Delay;
Expand Down
36 changes: 18 additions & 18 deletions matchbox_socket/src/webrtc_socket/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ impl Messenger for WasmMessenger {
.unwrap()
.as_string()
.expect("");
let mut rtc_session_desc_init_dict = RtcSessionDescriptionInit::new(RtcSdpType::Offer);
let offer_description = rtc_session_desc_init_dict.sdp(&offer_sdp);
JsFuture::from(conn.set_local_description(offer_description))
let rtc_session_desc_init_dict = RtcSessionDescriptionInit::new(RtcSdpType::Offer);
rtc_session_desc_init_dict.set_sdp(&offer_sdp);
JsFuture::from(conn.set_local_description(&rtc_session_desc_init_dict))
.await
.efix()
.unwrap();
Expand Down Expand Up @@ -160,8 +160,8 @@ impl Messenger for WasmMessenger {
};

// Set remote description
let mut remote_description = RtcSessionDescriptionInit::new(RtcSdpType::Answer);
remote_description.sdp(&sdp);
let remote_description = RtcSessionDescriptionInit::new(RtcSdpType::Answer);
remote_description.set_sdp(&sdp);
debug!("setting remote description");
JsFuture::from(conn.set_remote_description(&remote_description))
.await
Expand Down Expand Up @@ -234,9 +234,9 @@ impl Messenger for WasmMessenger {

// Set remote description
{
let mut remote_description = RtcSessionDescriptionInit::new(RtcSdpType::Offer);
let remote_description = RtcSessionDescriptionInit::new(RtcSdpType::Offer);
let sdp = offer;
remote_description.sdp(&sdp);
remote_description.set_sdp(&sdp);
JsFuture::from(conn.set_remote_description(&remote_description))
.await
.expect("failed to set remote description");
Expand All @@ -249,17 +249,17 @@ impl Messenger for WasmMessenger {

debug!("created answer");

let mut session_desc_init = RtcSessionDescriptionInit::new(RtcSdpType::Answer);
let session_desc_init = RtcSessionDescriptionInit::new(RtcSdpType::Answer);

let answer_sdp = Reflect::get(&answer, &JsValue::from_str("sdp"))
.efix()
.unwrap()
.as_string()
.expect("");

let answer_description = session_desc_init.sdp(&answer_sdp);
session_desc_init.set_sdp(&answer_sdp);

JsFuture::from(conn.set_local_description(answer_description))
JsFuture::from(conn.set_local_description(&session_desc_init))
.await
.efix()
.unwrap();
Expand Down Expand Up @@ -398,14 +398,14 @@ fn create_rtc_peer_connection(ice_server_config: &RtcIceServerConfig) -> RtcPeer
credential: String,
}

let mut peer_config = RtcConfiguration::new();
let peer_config = RtcConfiguration::new();
let ice_server_config = IceServerConfig {
urls: ice_server_config.urls.clone(),
username: ice_server_config.username.clone().unwrap_or_default(),
credential: ice_server_config.credential.clone().unwrap_or_default(),
};
let ice_server_config_list = [ice_server_config];
peer_config.ice_servers(&serde_wasm_bindgen::to_value(&ice_server_config_list).unwrap());
peer_config.set_ice_servers(&serde_wasm_bindgen::to_value(&ice_server_config_list).unwrap());
let connection = RtcPeerConnection::new_with_configuration(&peer_config).unwrap();

let connection_1 = connection.clone();
Expand Down Expand Up @@ -484,8 +484,8 @@ fn create_data_channel(
channel_config: &ChannelConfig,
channel_id: usize,
) -> RtcDataChannel {
let mut data_channel_config = data_channel_config(channel_config);
data_channel_config.id(channel_id as u16);
let data_channel_config = data_channel_config(channel_config);
data_channel_config.set_id(channel_id as u16);

let channel = connection.create_data_channel_with_data_channel_dict(
&format!("matchbox_socket_{channel_id}"),
Expand Down Expand Up @@ -557,13 +557,13 @@ fn leaking_channel_event_handler<T: FromWasmAbi + 'static>(
}

fn data_channel_config(channel_config: &ChannelConfig) -> RtcDataChannelInit {
let mut data_channel_config = RtcDataChannelInit::new();
let data_channel_config = RtcDataChannelInit::new();

data_channel_config.ordered(channel_config.ordered);
data_channel_config.negotiated(true);
data_channel_config.set_ordered(channel_config.ordered);
data_channel_config.set_negotiated(true);

if let Some(n) = channel_config.max_retransmits {
data_channel_config.max_retransmits(n);
data_channel_config.set_max_retransmits(n);
}

data_channel_config
Expand Down

0 comments on commit 0179f4d

Please sign in to comment.