From 6c8025c6dec52a26103186848510d72936f15603 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 15 Jan 2023 20:05:05 +0100 Subject: update some stuff --- client-native-rift/Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'client-native-rift') diff --git a/client-native-rift/Cargo.toml b/client-native-rift/Cargo.toml index 1f5e81f..cdc6b3b 100644 --- a/client-native-rift/Cargo.toml +++ b/client-native-rift/Cargo.toml @@ -6,12 +6,12 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.0.29", features = ["derive"] } -env_logger = "0.8" +clap = { version = "4.1.1", features = ["derive"] } +env_logger = "0.10.0" log = "0.4" -tokio = { version = "1.21", features = ["full"] } -bytes = "1.2.1" +tokio = { version = "1.24", features = ["full"] } +bytes = "1.3.0" -indicatif = "0.17.1" -humansize = "2.0.0" +indicatif = "0.17.3" +humansize = "2.1.3" -- cgit v1.2.3-70-g09d2 From 2c6f4dc839a279b9d5c10d674489998b021908b8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 5 Feb 2023 20:57:47 +0100 Subject: update deps --- Cargo.lock | 48 +++++++++--------- client-native-export-track/Cargo.toml | 8 +-- client-native-gui/Cargo.toml | 6 +-- client-native-lib/Cargo.toml | 6 +-- client-native-lib/src/crypto.rs | 9 ++-- client-native-lib/src/peer.rs | 93 +++++++++++++++-------------------- client-native-rift/Cargo.toml | 6 +-- client-native-rift/src/main.rs | 42 ++++++---------- server/Cargo.toml | 6 +-- 9 files changed, 103 insertions(+), 121 deletions(-) (limited to 'client-native-rift') diff --git a/Cargo.lock b/Cargo.lock index d116317..267b1b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -232,9 +232,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "arboard" @@ -631,9 +631,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "calloop" @@ -722,9 +722,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.1" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec7a4128863c188deefe750ac1d1dfe66c236909f845af04beed823638dc1b2" +checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" dependencies = [ "bitflags", "clap_derive", @@ -1687,9 +1687,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" dependencies = [ "futures-core", "futures-sink", @@ -1697,9 +1697,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" @@ -1714,9 +1714,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" [[package]] name = "futures-lite" @@ -1735,9 +1735,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ "proc-macro2", "quote", @@ -1746,21 +1746,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" dependencies = [ "futures-channel", "futures-core", @@ -2110,9 +2110,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" dependencies = [ "bytes", "futures-channel", @@ -3834,9 +3834,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.2" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ "autocfg", "bytes", diff --git a/client-native-export-track/Cargo.toml b/client-native-export-track/Cargo.toml index b8efdca..36ba652 100644 --- a/client-native-export-track/Cargo.toml +++ b/client-native-export-track/Cargo.toml @@ -6,10 +6,10 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.1", features = ["derive"] } +clap = { version = "4.1.4", features = ["derive"] } env_logger = "0.10.0" log = "0.4" -tokio = { version = "1.24", features = ["full"] } -bytes = "1.3.0" -anyhow = "1.0.68" +tokio = { version = "1.25", features = ["full"] } +bytes = "1.4.0" +anyhow = "1.0.69" diff --git a/client-native-gui/Cargo.toml b/client-native-gui/Cargo.toml index f41859c..767433c 100644 --- a/client-native-gui/Cargo.toml +++ b/client-native-gui/Cargo.toml @@ -6,12 +6,12 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.1", features = ["derive"] } +clap = { version = "4.1.4", features = ["derive"] } async-std = "1.12.0" -tokio = { version = "1.24.1", features = ["full"] } +tokio = { version = "1.25.0", features = ["full"] } env_logger = "0.10.0" log = "0.4" -anyhow = "1.0.68" +anyhow = "1.0.69" crossbeam-channel = "0.5.6" egui = "0.20.1" diff --git a/client-native-lib/Cargo.toml b/client-native-lib/Cargo.toml index 69c6e91..c9b0ea4 100644 --- a/client-native-lib/Cargo.toml +++ b/client-native-lib/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -tokio = { version = "1.24", features = ["full"] } -futures-util = "0.3.25" +tokio = { version = "1.25", features = ["full"] } +futures-util = "0.3.26" webrtc = "0.6.0" tokio-tungstenite = { version = "*", features = ["rustls-tls"] } @@ -22,4 +22,4 @@ sha256 = "1.1.1" rand = "0.8.5" rand_chacha = "0.3.1" base64 = "0.21.0" -bytes = "1.3.0" +bytes = "1.4.0" diff --git a/client-native-lib/src/crypto.rs b/client-native-lib/src/crypto.rs index 239c9f3..0472ec7 100644 --- a/client-native-lib/src/crypto.rs +++ b/client-native-lib/src/crypto.rs @@ -7,6 +7,7 @@ use aes_gcm::{ aead::{generic_array::sequence::GenericSequence, Aead}, Aes256Gcm, KeyInit, Nonce, }; +use base64::Engine; use log::info; pub struct Key(Aes256Gcm); @@ -14,7 +15,9 @@ pub struct Key(Aes256Gcm); impl Key { pub fn derive(secret: &str) -> Self { info!("running key generation..."); - let salt = base64::decode("thisisagoodsaltAAAAAAA==").unwrap(); + let salt = base64::engine::general_purpose::STANDARD + .decode("thisisagoodsaltAAAAAAA==") + .unwrap(); let mut key = [0u8; 32]; fastpbkdf2::pbkdf2_hmac_sha256(secret.as_bytes(), salt.as_slice(), 250000, &mut key); @@ -28,10 +31,10 @@ impl Key { let ciphertext = self.0.encrypt(&iv, s.as_bytes()).unwrap(); let mut packet = iv.to_vec(); // TODO this could be doing less allocations packet.extend(ciphertext); - base64::encode(packet) + base64::engine::general_purpose::STANDARD.encode(packet) } pub fn decrypt(&self, s: &str) -> String { - let r = base64::decode(s).unwrap(); + let r = base64::engine::general_purpose::STANDARD.decode(s).unwrap(); let iv = &r[0..12]; let ciphertext = &r[12..]; let plaintext = self.0.decrypt(Nonce::from_slice(iv), ciphertext).unwrap(); diff --git a/client-native-lib/src/peer.rs b/client-native-lib/src/peer.rs index b3b4dd4..8c27234 100644 --- a/client-native-lib/src/peer.rs +++ b/client-native-lib/src/peer.rs @@ -69,34 +69,28 @@ impl Peer { .on_peer_connection_state_change(Box::new(move |s: RTCPeerConnectionState| { info!("connection state changed: {s}"); Box::pin(async {}) - })) - .await; - + })); { let weak = Arc::::downgrade(&peer); - peer.peer_connection - .on_ice_candidate(box move |c| { - if let Some(peer) = weak.upgrade() { - Box::pin(async move { - if let Some(c) = c { - peer.on_ice_candidate(c).await - } - }) - } else { - Box::pin(async move {}) - } - }) - .await; + peer.peer_connection.on_ice_candidate(box move |c| { + if let Some(peer) = weak.upgrade() { + Box::pin(async move { + if let Some(c) = c { + peer.on_ice_candidate(c).await + } + }) + } else { + Box::pin(async move {}) + } + }) } { let weak = Arc::::downgrade(&peer); - peer.peer_connection - .on_negotiation_needed(box move || { - let peer = weak.upgrade().unwrap(); - Box::pin(async { peer.on_negotiation_needed().await }) - }) - .await; + peer.peer_connection.on_negotiation_needed(box move || { + let peer = weak.upgrade().unwrap(); + Box::pin(async { peer.on_negotiation_needed().await }) + }) } { @@ -124,37 +118,34 @@ impl Peer { } }) }) - .await; } { let weak = Arc::::downgrade(&peer); - peer.peer_connection - .on_data_channel(box move |dc| { - let peer = weak.upgrade().unwrap(); - Box::pin(async move { - if let Some(res) = peer - .remote_provided - .read() - .await - .get(&dc.label().to_string()) - { - info!("data channel for ({:?}) '{:?}'", res.id, res.label); - peer.inst - .event_handler - .resource_connected( - peer.clone(), - res, - TransportChannel::DataChannel(dc), - ) - .await; - } else { - warn!("got unassociated data channel; closed connection"); - dc.close().await.unwrap(); - } - }) + peer.peer_connection.on_data_channel(box move |dc| { + let peer = weak.upgrade().unwrap(); + Box::pin(async move { + if let Some(res) = peer + .remote_provided + .read() + .await + .get(&dc.label().to_string()) + { + info!("data channel for ({:?}) '{:?}'", res.id, res.label); + peer.inst + .event_handler + .resource_connected( + peer.clone(), + res, + TransportChannel::DataChannel(dc), + ) + .await; + } else { + warn!("got unassociated data channel; closed connection"); + dc.close().await.unwrap(); + } }) - .await; + }) } peer } @@ -228,10 +219,8 @@ impl Peer { pub async fn on_ice_candidate(&self, candidate: RTCIceCandidate) { debug!("publishing local ICE candidate"); - self.send_relay(RelayMessage::IceCandidate( - candidate.to_json().await.unwrap(), - )) - .await; + self.send_relay(RelayMessage::IceCandidate(candidate.to_json().unwrap())) + .await; } pub async fn on_remote_ice_candidate(&self, candidate: RTCIceCandidateInit) { debug!("adding remote ICE candidate"); diff --git a/client-native-rift/Cargo.toml b/client-native-rift/Cargo.toml index cdc6b3b..ccc0c5c 100644 --- a/client-native-rift/Cargo.toml +++ b/client-native-rift/Cargo.toml @@ -6,12 +6,12 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.1", features = ["derive"] } +clap = { version = "4.1.4", features = ["derive"] } env_logger = "0.10.0" log = "0.4" -tokio = { version = "1.24", features = ["full"] } -bytes = "1.3.0" +tokio = { version = "1.25", features = ["full"] } +bytes = "1.4.0" indicatif = "0.17.3" humansize = "2.1.3" diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs index 45f720a..6255fe7 100644 --- a/client-native-rift/src/main.rs +++ b/client-native-rift/src/main.rs @@ -167,8 +167,7 @@ impl EventHandler for Handler { info!("channel opened"); *writer.write().await = Some(s.args.action.create_writer().await) }) - }) - .await; + }); } { let writer = writer.clone(); @@ -183,8 +182,7 @@ impl EventHandler for Handler { exit(0); } }) - }) - .await; + }); } { let writer = writer.clone(); @@ -218,13 +216,11 @@ impl EventHandler for Handler { }) }) } - .await; dc.on_error(box move |err| { Box::pin(async move { error!("data channel errored: {err}"); }) - }) - .await; + }); } } }) @@ -292,27 +288,23 @@ impl LocalResource for FileSender { { let reader = reader.clone(); let reader_factory = reader_factory.clone(); - channel - .on_open(box move || { - let reader = reader.clone(); - Box::pin(async move { - info!("channel open"); - *reader.write().await = Some(reader_factory.create_reader().await); - }) + channel.on_open(box move || { + let reader = reader.clone(); + Box::pin(async move { + info!("channel open"); + *reader.write().await = Some(reader_factory.create_reader().await); }) - .await; + }) } { let reader = reader.clone(); - channel - .on_close(box move || { - let reader = reader.clone(); - Box::pin(async move { - info!("channel closed"); - *reader.write().await = None; - }) + channel.on_close(box move || { + let reader = reader.clone(); + Box::pin(async move { + info!("channel closed"); + *reader.write().await = None; }) - .await; + }) } { channel.set_buffered_amount_low_threshold(1 << 20).await; @@ -354,9 +346,7 @@ impl LocalResource for FileSender { .await; } - channel - .on_error(box move |err| Box::pin(async move { error!("channel error: {err}") })) - .await; + channel.on_error(box move |err| Box::pin(async move { error!("channel error: {err}") })) }) } } diff --git a/server/Cargo.toml b/server/Cargo.toml index 4f29cde..e2b0506 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] warp = "0.3" -tokio = { version = "1.24", features = ["full"] } +tokio = { version = "1.25", features = ["full"] } log = "0.4" env_logger = "0.10" -futures-util = "0.3.25" +futures-util = "0.3.26" listenfd = "1.0.0" -hyper = "0.14.23" +hyper = "0.14.24" serde = { version = "1.0.152", features = ["derive"] } serde_json = "*" -- cgit v1.2.3-70-g09d2 From 6f4a9528e6d55b0f8a94b452948dd74cf85976b3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 5 Feb 2023 21:25:24 +0100 Subject: set_buffered_amount_low_threshold doesnt behave --- client-native-rift/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client-native-rift') diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs index 6255fe7..201e91d 100644 --- a/client-native-rift/src/main.rs +++ b/client-native-rift/src/main.rs @@ -23,6 +23,7 @@ use std::{ atomic::{AtomicUsize, Ordering}, Arc, }, + time::Duration, }; use tokio::{ fs::{self, File}, @@ -307,8 +308,8 @@ impl LocalResource for FileSender { }) } { - channel.set_buffered_amount_low_threshold(1 << 20).await; let reader = reader.clone(); + let pos = pos.clone(); let channel2 = channel.clone(); channel .on_buffered_amount_low(box move || { @@ -344,8 +345,8 @@ impl LocalResource for FileSender { }) }) .await; + channel.set_buffered_amount_low_threshold(1).await; } - channel.on_error(box move |err| Box::pin(async move { error!("channel error: {err}") })) }) } -- cgit v1.2.3-70-g09d2 From 9dfc929b709d4187dc307f68a42fa058eda7a4c1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 11 Feb 2023 10:29:02 +0100 Subject: standalone binary --- Cargo.lock | 250 ++++++++++++++++++++++++----------------- client-native-rift/src/main.rs | 1 - server/Cargo.toml | 7 +- server/src/assets.rs | 37 ++++++ server/src/main.rs | 9 +- 5 files changed, 195 insertions(+), 109 deletions(-) create mode 100644 server/src/assets.rs (limited to 'client-native-rift') diff --git a/Cargo.lock b/Cargo.lock index 267b1b6..b3e1803 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5568a4aa5ba8adf5175c5c460b030e27d8893412976cc37bef0e4fbc16cfbba" +checksum = "fe21446ad43aa56417a767f3e2f3d7c4ca522904de1dd640529a76e9c5c3b33c" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -63,7 +63,7 @@ dependencies = [ "once_cell", "parking_lot", "paste", - "windows 0.42.0", + "windows", ] [[package]] @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", "once_cell", @@ -448,9 +448,9 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.61" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" dependencies = [ "proc-macro2", "quote", @@ -605,18 +605,18 @@ checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe233b960f12f8007e3db2d136e3cb1c291bfd7396e384ee76025fc1a3932b4" +checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" dependencies = [ "proc-macro2", "quote", @@ -937,9 +937,9 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "crc" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] @@ -1112,12 +1112,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" dependencies = [ - "darling_core 0.14.2", - "darling_macro 0.14.2", + "darling_core 0.14.3", + "darling_macro 0.14.3", ] [[package]] @@ -1136,9 +1136,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" dependencies = [ "fnv", "ident_case", @@ -1161,11 +1161,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" dependencies = [ - "darling_core 0.14.2", + "darling_core 0.14.3", "quote", "syn", ] @@ -1229,7 +1229,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" dependencies = [ - "darling 0.14.2", + "darling 0.14.3", "proc-macro2", "quote", "syn", @@ -1470,7 +1470,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ - "darling 0.14.2", + "darling 0.14.3", "proc-macro2", "quote", "syn", @@ -1672,9 +1672,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" dependencies = [ "futures-channel", "futures-core", @@ -1703,9 +1703,9 @@ checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" dependencies = [ "futures-core", "futures-task", @@ -1865,9 +1865,9 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", @@ -1889,42 +1889,42 @@ dependencies = [ [[package]] name = "glutin" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524d807cd49a0c56a53ef9a6738cd15e7c8c4e9d37a3b7fdb3c250c1cd5bf7a3" +checksum = "373e3fbcfa6b9c313faa03625a08268168ba9be1003d1ecfcebd5266388aa131" dependencies = [ "bitflags", "cfg_aliases", "cgl", - "cocoa", "core-foundation", + "dispatch", "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", "libloading", - "objc", + "objc2", "once_cell", "raw-window-handle 0.5.0", "wayland-sys 0.30.1", - "windows-sys 0.36.1", + "windows-sys 0.45.0", "x11-dl", ] [[package]] name = "glutin_egl_sys" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3adbb8fec0e18e340f990c78f79f5f0e142d0d83f46b10909aaa7d251c00afdf" +checksum = "e5aaf0abb5c4148685b33101ae326a207946b4d3764d6cdc79f8316cdaa8367d" dependencies = [ "gl_generator", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "glutin_glx_sys" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "947c4850c58211c9627969c2b4e2674764b81ae5b47bab2c9a477d7942f96e0f" +checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" dependencies = [ "gl_generator", "x11-dl", @@ -1932,9 +1932,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c33975a6c9d49d72c8f032a60079bf8df536954fbf9e4cee90396ace815c57" +checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" dependencies = [ "gl_generator", ] @@ -2002,9 +2002,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -2148,6 +2148,25 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.2" @@ -2266,9 +2285,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -2310,6 +2329,7 @@ dependencies = [ "env_logger", "futures-util", "hyper", + "include_dir", "listenfd", "log", "serde", @@ -2628,6 +2648,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +dependencies = [ + "memchr", +] + [[package]] name = "num-bigint" version = "0.4.3" @@ -2670,18 +2699,18 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2794,9 +2823,9 @@ checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "owned_ttf_parser" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5f3c7ca08b6879e7965fb25e24d1f5eeb32ea73f9ad99b3854778a38c57e93" +checksum = "e25e9fb15717794fae58ab55c26e044103aad13186fbb625893f9a3bbcc24228" dependencies = [ "ttf-parser", ] @@ -3005,13 +3034,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -3401,9 +3429,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -3414,9 +3442,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc 0.2.139", @@ -3444,9 +3472,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "itoa", "ryu", @@ -3547,9 +3575,9 @@ dependencies = [ [[package]] name = "sha256" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e334db67871c14c18fc066ad14af13f9fdf5f9a91c61af432d1e3a39c8c6a141" +checksum = "328169f167261957e83d82be47f9e36629e257c62308129033d7f7e7c173d180" dependencies = [ "hex", "sha2 0.9.9", @@ -3929,12 +3957,20 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.5.10" +name = "toml_datetime" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" + +[[package]] +name = "toml_edit" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ - "serde", + "indexmap", + "nom8", + "toml_datetime", ] [[package]] @@ -4248,9 +4284,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4258,9 +4294,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -4273,9 +4309,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -4285,9 +4321,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4295,9 +4331,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -4308,9 +4344,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wayland-client" @@ -4399,9 +4435,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4409,9 +4445,9 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74f5ff7786c4c21f61ba8e30ea29c9745f06fca0a4a02d083b3c662583399e8" +checksum = "97d1fa1e5c829b2bf9eb1e28fb950248b797cd6a04866fbdfa8bc31e5eef4c78" dependencies = [ "core-foundation", "dirs", @@ -4422,7 +4458,6 @@ dependencies = [ "raw-window-handle 0.5.0", "url", "web-sys", - "windows 0.43.0", ] [[package]] @@ -4721,21 +4756,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.1", ] -[[package]] -name = "windows" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", -] - [[package]] name = "windows-implement" version = "0.42.0" @@ -4775,6 +4795,30 @@ dependencies = [ "windows_x86_64_msvc 0.42.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" @@ -4891,12 +4935,12 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.20.1" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc 0.2.139", + "once_cell", "pkg-config", ] diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs index 201e91d..1f10b83 100644 --- a/client-native-rift/src/main.rs +++ b/client-native-rift/src/main.rs @@ -23,7 +23,6 @@ use std::{ atomic::{AtomicUsize, Ordering}, Arc, }, - time::Duration, }; use tokio::{ fs::{self, File}, diff --git a/server/Cargo.toml b/server/Cargo.toml index e2b0506..907b8c4 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -12,4 +12,9 @@ futures-util = "0.3.26" listenfd = "1.0.0" hyper = "0.14.24" serde = { version = "1.0.152", features = ["derive"] } -serde_json = "*" +serde_json = "1.0.93" +include_dir = "0.7.3" + +[features] +default = ["standalone"] +standalone = [] diff --git a/server/src/assets.rs b/server/src/assets.rs new file mode 100644 index 0000000..068bc0c --- /dev/null +++ b/server/src/assets.rs @@ -0,0 +1,37 @@ +#[cfg(not(feature = "standalone"))] +#[macro_export] +macro_rules! s_file { + ($path: literal) => { + warp::fs::file($path) + }; +} + +#[cfg(not(feature = "standalone"))] +#[macro_export] +macro_rules! s_asset_dir { + () => { + warp::fs::dir("client-web/public/assets") + }; +} + +#[cfg(feature = "standalone")] +#[macro_export] +macro_rules! s_file { + ($path: literal) => { + warp::get().map(|| include_str!(concat!("../../", $path))) + }; +} + +#[cfg(feature = "standalone")] +#[macro_export] +macro_rules! s_asset_dir { + () => {{ + use include_dir::{include_dir, Dir}; + const DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/../client-web/public/assets"); + warp::path::tail().and_then(|t: warp::path::Tail| async move { + DIR.get_file(t.as_str()) + .map(|f| f.contents_utf8().unwrap()) + .ok_or(warp::reject::not_found()) + }) + }}; +} diff --git a/server/src/main.rs b/server/src/main.rs index 413f23a..518ea99 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -3,6 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2022 metamuffin */ +pub mod assets; pub mod protocol; pub mod room; @@ -41,10 +42,10 @@ async fn run() { .and(warp::ws()) .map(signaling_connect); - let index: _ = warp::path!().and(warp::fs::file("../client-web/public/start.html")); - let room: _ = warp::path!("room").and(warp::fs::file("../client-web/public/app.html")); - let assets: _ = warp::path("assets").and(warp::fs::dir("../client-web/public/assets")); - let sw_script: _ = warp::path("sw.js").and(warp::fs::file("../client-web/public/assets/sw.js")); + let index: _ = warp::path!().and(s_file!("client-web/public/start.html")); + let room: _ = warp::path!("room").and(s_file!("client-web/public/app.html")); + let assets: _ = warp::path("assets").and(s_asset_dir!()); + let sw_script: _ = warp::path("sw.js").and(s_file!("client-web/public/assets/sw.js")); let favicon: _ = warp::path!("favicon.ico").map(|| ""); let old_format_redirect: _ = warp::path!("room" / String).map(|rsecret| { reply::with_header( -- cgit v1.2.3-70-g09d2 From 0a8fb4025011433c4bbbb093a11fdde6180c8afa Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 21 Feb 2023 16:13:21 +0100 Subject: mention client.toml --- Cargo.lock | 74 +++++++++++++++++++---------------- client-native-export-track/Cargo.toml | 2 +- client-native-gui/Cargo.toml | 4 +- client-native-rift/Cargo.toml | 2 +- readme.md | 4 ++ 5 files changed, 48 insertions(+), 38 deletions(-) (limited to 'client-native-rift') diff --git a/Cargo.lock b/Cargo.lock index 5f13e86..798d24f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -735,9 +735,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -810,9 +810,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.4" +version = "4.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" dependencies = [ "bitflags", "clap_derive", @@ -1329,9 +1329,9 @@ dependencies = [ [[package]] name = "eframe" -version = "0.21.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07e59d9d5ba69e1d261c76e6aa88a95601375805ee473de5eb3163bf5a57704" +checksum = "3df3ce60931e5f2d83bab4484d1a283908534d5308cc6b0c5c22c59cd15ee7cc" dependencies = [ "bytemuck", "egui", @@ -1366,9 +1366,9 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13deffe034ab864042f00d0d1fa220b86bb9a230a7362b81844bb8d1dc6b899" +checksum = "ab43597ba41f0ce39a364ad83185594578bfd8b3409b99dbcbb01df23afc3dbb" dependencies = [ "accesskit_winit", "android-activity", @@ -1946,6 +1946,12 @@ dependencies = [ "libc 0.2.139", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -2162,12 +2168,12 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" dependencies = [ "libc 0.2.139", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2178,14 +2184,14 @@ checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.1", "io-lifetimes", "rustix", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2384,7 +2390,7 @@ version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" dependencies = [ - "libc 0.2.139", + "libc 0.1.12", ] [[package]] @@ -2453,14 +2459,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc 0.2.139", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2597,7 +2603,7 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc 0.2.139", ] @@ -2703,9 +2709,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "opaque-debug" @@ -2796,15 +2802,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc 0.2.139", "redox_syscall 0.2.16", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2994,9 +3000,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] @@ -3208,16 +3214,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.6" +version = "0.36.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc 0.2.139", "linux-raw-sys", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -3797,9 +3803,9 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" @@ -4095,9 +4101,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" diff --git a/client-native-export-track/Cargo.toml b/client-native-export-track/Cargo.toml index 36ba652..c39a579 100644 --- a/client-native-export-track/Cargo.toml +++ b/client-native-export-track/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.4", features = ["derive"] } +clap = { version = "4.1.6", features = ["derive"] } env_logger = "0.10.0" log = "0.4" diff --git a/client-native-gui/Cargo.toml b/client-native-gui/Cargo.toml index 6d76e15..4829547 100644 --- a/client-native-gui/Cargo.toml +++ b/client-native-gui/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.4", features = ["derive"] } +clap = { version = "4.1.6", features = ["derive"] } async-std = "1.12.0" tokio = { version = "1.25.0", features = ["full"] } env_logger = "0.10.0" @@ -15,7 +15,7 @@ anyhow = "1.0.69" crossbeam-channel = "0.5.6" egui = "0.21.0" -eframe = "0.21.0" +eframe = "0.21.3" libmpv = { git = "https://github.com/sirno/libmpv-rs.git", branch = "upgrade-libmpv" } diff --git a/client-native-rift/Cargo.toml b/client-native-rift/Cargo.toml index ccc0c5c..170b32f 100644 --- a/client-native-rift/Cargo.toml +++ b/client-native-rift/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.4", features = ["derive"] } +clap = { version = "4.1.6", features = ["derive"] } env_logger = "0.10.0" log = "0.4" diff --git a/readme.md b/readme.md index 811e604..92b4a3f 100644 --- a/readme.md +++ b/readme.md @@ -30,12 +30,16 @@ For trying it out, a hosted version is available on pacman -S --needed deno rustup make coreutils; rustup install nightly git clone https://codeberg.org/metamuffin/keks-meet.git cd keks-meet +cp config/client.example.toml config/client.toml # use the example config. the defaults work. make run # or `make build` ``` When changing code, use `make watch` to re-build things automatically as needed. (run `cargo install systemfd cargo-watch` if needed) +The client configuration file (`config/client.toml`) configures the client and +requires server recompilation on change for now. + The server's bind address can be controlled using the `BIND` environment variable. In production you can also activate the `standalone` feature to embed all assets into the binary; This speeds it up and allows the server to run from -- cgit v1.2.3-70-g09d2