From 25ebc80e2d693e1defecd7f5c4599603817e2275 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 00:48:41 +0200 Subject: [PATCH 01/17] FCM: web-style registration on the app's Firebase project Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 1 + Cargo.toml | 1 + examples/fcm_register.rs | 13 ++++ src/push.rs | 127 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 examples/fcm_register.rs diff --git a/Cargo.lock b/Cargo.lock index 7424e5e..391b94c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,6 +215,7 @@ dependencies = [ name = "bticino-easykit" version = "0.1.0" dependencies = [ + "base64 0.22.1", "clap", "dirs", "fcm_receiver_rs", diff --git a/Cargo.toml b/Cargo.toml index 5d4a90f..8a5893b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ name = "bticino-easykit" path = "src/bin/cli.rs" [dependencies] +base64 = "0.22" clap = { version = "4", features = ["derive"] } dirs = "5" fcm_receiver_rs = "0.1.1" diff --git a/examples/fcm_register.rs b/examples/fcm_register.rs new file mode 100644 index 0000000..e68e847 --- /dev/null +++ b/examples/fcm_register.rs @@ -0,0 +1,13 @@ +//! Registers (or loads) the FCM identity only; touches nothing on the +//! Netatmo account. Useful to debug Google-side registration. +fn main() { + match bticino_easykit::push::load_or_register() { + Ok((_, st, new)) => println!( + "{} android_id={} token_len={}", + if new { "registered" } else { "loaded" }, + st.android_id, + st.fcm_token.len() + ), + Err(e) => eprintln!("error: {e}"), + } +} diff --git a/src/push.rs b/src/push.rs index e7ab40c..6b5bf4c 100644 --- a/src/push.rs +++ b/src/push.rs @@ -47,6 +47,23 @@ impl Push { Self { push_type, extra_params, fields } } + /// Decrypted web push: `{"data": {"push_type": ..., "extra_params": ...}, ...}`. + pub fn from_webpush(bytes: &[u8]) -> Self { + let v: Value = serde_json::from_slice(bytes).unwrap_or(Value::Null); + let src = if v["data"].is_object() { &v["data"] } else { &v }; + let fields = src + .as_object() + .map(|m| { + m.iter() + .map(|(k, x)| (k.clone(), x.as_str().map(str::to_owned).unwrap_or_else(|| x.to_string()))) + .collect() + }) + .unwrap_or_else(|| { + BTreeMap::from([("raw".to_owned(), String::from_utf8_lossy(bytes).into_owned())]) + }); + Self::from_fields(fields) + } + /// `"offer"`, `"terminate"`, `"rescind"` for `*-rtc` pushes. pub fn rtc_type(&self) -> Option<&str> { self.push_type.ends_with("-rtc").then(|| self.extra_params["data"]["type"].as_str()).flatten() @@ -79,8 +96,7 @@ pub fn load_or_register() -> Result<(FcmClient, FcmState, bool)> { return Ok((c, st, false)); } let (private_key, auth_secret) = c.create_new_keys().map_err(|e| Error::Other(format!("FCM: {e}")))?; - let (fcm_token, _, android_id, security_token) = - c.register().map_err(|e| Error::Other(format!("FCM registration: {e}")))?; + let (fcm_token, android_id, security_token) = register_web(&private_key, &auth_secret).map_err(|e| Error::Other(format!("FCM registration: {e}")))?; let st = FcmState { android_id, security_token, fcm_token, private_key, auth_secret }; std::fs::create_dir_all(config_dir())?; let body = toml::to_string(&st).map_err(|e| Error::Other(e.to_string()))?; @@ -88,6 +104,100 @@ pub fn load_or_register() -> Result<(FcmClient, FcmState, bool)> { Ok((c, st, true)) } +/// Web (Chrome) FCM registration on the app's Firebase project, as done by +/// `firebase-messaging` for Ring: GCM check-in, `register3` as +/// `org.chromium.linux` with a `wp:` subtype (retried, errors are often +/// transient), Firebase Installation, then a web push registration. The +/// API key only accepts the app's `X-Android-Package`/`X-Android-Cert`. +/// (A pure Android `register3` gets `FIS_AUTH_ERROR`.) +fn register_web(private_key_b64: &str, auth_secret_b64: &str) -> fcm_receiver_rs::Result<(String, u64, u64)> { + use base64::engine::general_purpose::{STANDARD, URL_SAFE_NO_PAD}; + use base64::Engine; + use fcm_receiver_rs::{crypto, http_client as h, Error as E}; + + let http = h::build_default_http_client()?; + let resp = h::send_gcm_check_in_request(&http, &fcm_receiver_rs::messages::create_check_in_request(0, None))?; + let android_id = resp.android_id.ok_or(E::InvalidData("no android_id"))?; + let security_token = resp.security_token.ok_or(E::InvalidData("no security_token"))?; + + let subtype = format!("wp:receiver.push.com#{}", fcm_receiver_rs::util::generate_firebase_fid()?); + let mut gcm_token = None; + let mut last = None; + for _ in 0..5 { + let req = h::GcmRegisterRequest { + android_id, + security_token, + app_id: p::FCM_APP_ID, + android_app: None, + installation_auth: None, + sender_override: None, + subtype_override: Some(subtype.clone()), + delete: false, + extra_params: Vec::new(), + }; + match h::send_gcm_register_request(&http, &req) { + Ok(t) => { + gcm_token = Some(t); + break; + } + Err(e) => { + last = Some(e); + std::thread::sleep(std::time::Duration::from_secs(1)); + } + } + } + let gcm_token = match gcm_token { + Some(t) => t, + None => return Err(last.unwrap_or(E::InvalidData("register3 failed"))), + }; + + let fid = fcm_receiver_rs::util::generate_firebase_fid()?; + let install = h::send_fcm_install_request( + &http, + &h::FcmInstallRequest { + api_key: p::FCM_API_KEY, + project_id: p::FCM_PROJECT_ID, + app_id: p::FCM_APP_ID, + fid: &fid, + // The API key is restricted to the Android app. + android_app: Some(h::AndroidAppOptions { + gcm_sender_id: p::FCM_SENDER_ID, + android_package: p::ANDROID_PACKAGE, + android_package_cert: p::ANDROID_CERT_SHA1, + }), + firebase_client_header: None, + firebase_client_log_type: None, + user_agent: None, + }, + )?; + + let sk = crypto::decode_private_key(&STANDARD.decode(private_key_b64).map_err(|_| E::InvalidData("key"))?)?; + let auth = STANDARD.decode(auth_secret_b64).map_err(|_| E::InvalidData("auth"))?; + let body = serde_json::json!({ "web": { + "applicationPubKey": null, + "auth": URL_SAFE_NO_PAD.encode(auth), + "endpoint": h::build_endpoint_url(&gcm_token), + "p256dh": URL_SAFE_NO_PAD.encode(crypto::public_key_bytes(&sk.public_key())), + }}); + let r = reqwest::blocking::Client::new() + .post(format!("https://fcmregistrations.googleapis.com/v1/projects/{}/registrations", p::FCM_PROJECT_ID)) + .header("x-goog-api-key", p::FCM_API_KEY) + .header("X-Android-Package", p::ANDROID_PACKAGE) + .header("X-Android-Cert", p::ANDROID_CERT_SHA1) + .header("x-goog-firebase-installations-auth", &install.auth_token.token) + .json(&body) + .send() + .map_err(|e| E::Other(e.to_string()))?; + let status = r.status(); + let text = r.text().map_err(|e| E::Other(e.to_string()))?; + if !status.is_success() { + return Err(E::Other(format!("fcmregistrations HTTP {status}: {text}"))); + } + let v: Value = serde_json::from_str(&text)?; + let token = v["token"].as_str().ok_or(E::InvalidData("no FCM token"))?.to_owned(); + Ok((token, android_id, security_token)) +} + /// Tells the Netatmo cloud to deliver call pushes to this FCM token. pub fn add_push_context(api: &mut Client, fcm_token: &str) -> Result { let device = format!("bticino-easykit+{}", std::env::consts::OS); @@ -108,10 +218,13 @@ pub fn drop_push_context(api: &mut Client) -> Result> { /// Blocks, calling `on_push` for every data message. pub fn listen(mut c: FcmClient, on_push: impl Fn(Push) + Send + Sync + 'static) -> Result<()> { + let on_push = Arc::new(on_push); + let raw = on_push.clone(); c.on_raw_message = Some(Arc::new(move |m| { let fields = m.app_data.into_iter().map(|d| (d.key, d.value)).collect(); - on_push(Push::from_fields(fields)); + raw(Push::from_fields(fields)); })); + c.on_data_message = Some(Arc::new(move |bytes| on_push(Push::from_webpush(&bytes)))); c.start_listening().map_err(|e| Error::Other(format!("FCM listen: {e}"))) } @@ -132,6 +245,14 @@ mod tests { assert_eq!(p.extra_params["tag_id"], "t"); } + #[test] + fn parses_webpush_payload() { + let p = Push::from_webpush( + br#"{"data":{"push_type":"BDIY-rtc","extra_params":"{\"data\":{\"type\":\"terminate\"}}"},"from":"514810499773"}"#, + ); + assert_eq!(p.rtc_type(), Some("terminate")); + } + #[test] fn non_rtc_push_has_no_rtc_type() { let mut f = BTreeMap::new(); From df9c963d9e7c69f1bede3caa295028cb71f31b44 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 14:26:24 +0200 Subject: [PATCH 02/17] WebRTC live view and call answering with trickle ICE; TURN credentials Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 1311 +++++++++++++++++++++++++++++++++++++++++++---- Cargo.toml | 8 + src/bin/cli.rs | 33 ++ src/call.rs | 493 ++++++++++++++++++ src/client.rs | 18 + src/lib.rs | 1 + src/protocol.rs | 114 +++++ 7 files changed, 1890 insertions(+), 88 deletions(-) create mode 100644 src/call.rs diff --git a/Cargo.lock b/Cargo.lock index 391b94c..31b5db0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,7 +14,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "generic-array", ] @@ -136,6 +136,97 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive 0.5.1", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "asn1-rs" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f43a50ac4fdca5df8e885c21b835997f0a1cdee65494a6847694a98652d9d8" +dependencies = [ + "asn1-rs-derive 0.6.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 2.0.21", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure 0.13.2", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure 0.13.2", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[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-compression" version = "0.4.51" @@ -148,6 +239,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -190,6 +292,15 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -211,20 +322,37 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + [[package]] name = "bticino-easykit" version = "0.1.0" dependencies = [ + "async-trait", "base64 0.22.1", + "bytes", "clap", "dirs", + "env_logger", "fcm_receiver_rs", + "futures-util", "reqwest 0.12.28", "rpassword", + "rtc", "serde", "serde_json", "thiserror 2.0.21", + "tokio", + "tokio-tungstenite", "toml", + "webrtc", ] [[package]] @@ -233,6 +361,29 @@ version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[package]] +name = "bytecheck" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26333eeac754f0ad8a6bcd0eb0ac012156302e4e16b852b72ee399aea4f12c29" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "rancor", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46d07918caa9eeaaf06b7873925c53a61daac173539b4f7715090745e44e4e69" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "bytemuck" version = "1.25.2" @@ -261,6 +412,18 @@ dependencies = [ "shlex", ] +[[package]] +name = "ccm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae3c82e4355234767756212c570e29833699ab63e6ffd161887314cc5b43847" +dependencies = [ + "aead", + "cipher", + "ctr", + "subtle", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -296,7 +459,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "inout", ] @@ -373,12 +536,27 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ebdda89edc534bf8d5dd2857562633b6495557e5846552ade994b99ed13c36a" +[[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 = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "core-foundation" version = "0.9.4" @@ -469,6 +647,30 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[package]] +name = "crc32c" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +dependencies = [ + "rustc_version", +] + [[package]] name = "crc32fast" version = "1.5.3" @@ -478,6 +680,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -501,6 +709,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + [[package]] name = "ctr" version = "0.9.2" @@ -516,17 +733,82 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "defmt" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "defmt-parser" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" +dependencies = [ + "thiserror 2.0.21", +] + [[package]] name = "der" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid", + "const-oid 0.9.6", "pem-rfc7468", "zeroize", ] +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs 0.6.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs 0.7.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + [[package]] name = "deranged" version = "0.5.9" @@ -539,12 +821,23 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.6", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid 0.10.2", + "crypto-common 0.2.2", +] + [[package]] name = "dirs" version = "5.0.1" @@ -594,7 +887,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", @@ -633,7 +926,7 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", @@ -660,6 +953,29 @@ dependencies = [ "simdutf8", ] +[[package]] +name = "env_filter" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + [[package]] name = "equivalent" version = "1.0.3" @@ -676,6 +992,26 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "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", + "pin-project-lite", +] + [[package]] name = "extended" version = "0.1.0" @@ -779,6 +1115,21 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.34" @@ -795,12 +1146,34 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + [[package]] name = "futures-io" version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "futures-sink" version = "0.3.34" @@ -819,8 +1192,10 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ + "futures-channel", "futures-core", "futures-io", + "futures-macro", "futures-sink", "futures-task", "memchr", @@ -939,7 +1314,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1010,8 +1385,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "hyper" -version = "0.14.32" +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ @@ -1255,6 +1639,43 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jiff" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +dependencies = [ + "defmt", + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "jni" version = "0.21.1" @@ -1373,18 +1794,43 @@ dependencies = [ "libc", ] +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.9.1" @@ -1412,6 +1858,26 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" +[[package]] +name = "munge" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e17401f259eba956ca16491461b6e8f72913a0a114e39736ce404410f915a0c" +dependencies = [ + "munge_macro", +] + +[[package]] +name = "munge_macro" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4568f25ccbd45ab5d5603dc34318c1ec56b117531781260002151b8530a9f931" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "native-tls" version = "0.2.18" @@ -1458,6 +1924,29 @@ dependencies = [ "jni-sys 0.3.1", ] +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-bigint" version = "0.4.8" @@ -1617,6 +2106,24 @@ dependencies = [ "objc2", ] +[[package]] +name = "oid-registry" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs 0.6.2", +] + +[[package]] +name = "oid-registry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +dependencies = [ + "asn1-rs 0.7.2", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1696,6 +2203,12 @@ dependencies = [ "sha2", ] +[[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.5" @@ -1719,6 +2232,26 @@ dependencies = [ "windows-link", ] +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", +] + +[[package]] +name = "pem" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d354a98a3d1251555de99e8fdd8afda05573c31b82f59063a7b0a29b5527f120" +dependencies = [ + "base64 0.23.1", + "serde_core", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -1768,6 +2301,21 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + [[package]] name = "potential_utf" version = "0.1.6" @@ -1851,6 +2399,26 @@ dependencies = [ "prost", ] +[[package]] +name = "ptr_meta" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743da816b98c921cdbe8628ef7381b76f25ecf4da599fc80aca90eae7ef70cc0" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c8d9ca532f185d5d4db7a7c9d51420b452168ea1c2b913953281bd6fe1fcbd0" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "quinn" version = "0.11.12" @@ -1861,7 +2429,7 @@ dependencies = [ "cfg_aliases", "pin-project-lite", "quinn-proto", - "quinn-udp", + "quinn-udp 0.5.16", "rustc-hash", "rustls", "socket2 0.6.5", @@ -1907,6 +2475,19 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "quinn-udp" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47091c86514c2e11452cb228dee77037334b99d92a23e4c69aa5982261f39247" +dependencies = [ + "cfg_aliases", + "libc", + "log", + "socket2 0.6.5", + "windows-sys 0.61.2", +] + [[package]] name = "quote" version = "1.0.47" @@ -1922,6 +2503,15 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rancor" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b534442d0fcdb55d66f373d9cac6d33b6293a2335bc2136dbd06ce0e87d2572" +dependencies = [ + "ptr_meta", +] + [[package]] name = "rand" version = "0.8.8" @@ -1978,6 +2568,20 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "rcgen" +version = "0.14.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8774e05a7d0de114588e6a28fe7e71694b82614ed569d86d8b389dfbc98b8ad8" +dependencies = [ + "pem 4.0.0", + "ring", + "rustls-pki-types", + "time", + "x509-parser 0.18.1", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -2027,6 +2631,15 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +[[package]] +name = "rend" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "663ba70707f96e871406fe10d68128412e619b06d1d47cb91c3a4c6501176240" +dependencies = [ + "bytecheck", +] + [[package]] name = "reqwest" version = "0.11.27" @@ -2054,106 +2667,396 @@ dependencies = [ "pin-project-lite", "rustls-pemfile", "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.5.0", + "http-body 1.1.0", + "http-body-util", + "hyper 1.12.0", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rkyv" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9776093b7ca170454ab1406954f7b7d97a57c51dc6c0642957fb2ef25c2d399" +dependencies = [ + "bytecheck", + "bytes", + "hashbrown", + "indexmap", + "munge", + "ptr_meta", + "rancor", + "rend", + "rkyv_derive", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c25ef604ac7dd839d44d64648952ea23c97866f124ff671b0ed2cf3ad9bb06e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "rodio" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40ecf59e742e03336be6a3d53755e789fd05a059fa22dfa0ed624722319e183" +dependencies = [ + "cpal", + "dasp_sample", + "num-rational", + "symphonia", +] + +[[package]] +name = "rpassword" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da316a15f47e3d053de9cb2c439650bd8fa4aaeb9365f2e5f27f492ff73c196" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.61.2", +] + +[[package]] +name = "rtc" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2ca201de5ccc83aa3c08d49a2f08d7ed0aeeb2052fb1ccc517a8b77a6927ce" +dependencies = [ + "bytes", + "hex", + "log", + "pem 3.0.6", + "rand 0.10.3", + "rcgen", + "rtc-crypto", + "rtc-datachannel", + "rtc-dtls", + "rtc-ice", + "rtc-interceptor", + "rtc-mdns", + "rtc-media", + "rtc-rtcp", + "rtc-rtp", + "rtc-sctp", + "rtc-sdp", + "rtc-shared", + "rtc-srtp", + "rtc-stun", + "rtc-turn", + "rustls", + "sansio", + "serde", + "serde_json", + "unicase", + "url", + "x509-parser 0.16.0", +] + +[[package]] +name = "rtc-crypto" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404ea28682271626739dfb1f3a04e96c596490b948d7629d9e4651dd4ba6aaf3" +dependencies = [ + "aes", + "ccm", + "ctr", + "hmac", + "md-5", + "rand 0.10.3", + "ring", + "sha1 0.10.7", + "subtle", + "thiserror 2.0.21", + "zeroize", +] + +[[package]] +name = "rtc-datachannel" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d93dd81014535ff0134c0f19dbccfbae4d5ceb6010cf917c1a6056ea2c0d9bb" +dependencies = [ + "bytes", + "log", + "rtc-sctp", + "rtc-shared", + "sansio", +] + +[[package]] +name = "rtc-dtls" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2fe5767d6caf61018d52189b3b8e37075799eeb81cd5ab452307c7e7ebd97e" +dependencies = [ + "bytecheck", + "byteorder", + "bytes", + "der-parser 9.0.0", + "log", + "pem 3.0.6", + "rcgen", + "rkyv", + "rtc-crypto", + "rtc-shared", + "rustls", + "x509-parser 0.16.0", +] + +[[package]] +name = "rtc-ice" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099984f1be120b2e5692f232f8cbb82e53f6b4261c5c2eeda5be6223ba1adaa9" +dependencies = [ + "bytes", + "crc", + "log", + "rtc-crypto", + "rtc-mdns", + "rtc-shared", + "rtc-stun", + "sansio", + "serde", + "url", + "uuid", +] + +[[package]] +name = "rtc-interceptor" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e7df85d7aacf6e3f69bb922a6c9f83b2a29461038d06285df7642206df64cf" +dependencies = [ + "log", + "rand 0.10.3", + "rtc-rtcp", + "rtc-rtp", + "rtc-shared", + "sansio", +] + +[[package]] +name = "rtc-mdns" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86ac3cafd411bef81d70aff9d59d9520331b29970f7e361180da99e7a8b5a0d" +dependencies = [ + "bytes", + "log", + "rtc-shared", + "sansio", + "socket2 0.6.5", +] + +[[package]] +name = "rtc-media" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76840ad2aff52efeb16a613db26c16981841a6cf50907bff950884f00f9d9a9" +dependencies = [ + "byteorder", + "bytes", + "rand 0.10.3", + "rtc-rtp", + "rtc-shared", + "thiserror 2.0.21", +] + +[[package]] +name = "rtc-rtcp" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "485aa259bdb68e550363c40c8dc30c1c453ddd80f0cf7224dd2d72dffd5e01c2" +dependencies = [ + "bytes", + "rtc-shared", +] + +[[package]] +name = "rtc-rtp" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a640f266927139a899a3a93b5cf4aa3626594ee2e5d26202b60930bb42cb445" +dependencies = [ + "bytes", + "memchr", + "rand 0.10.3", + "rtc-shared", + "serde", ] [[package]] -name = "reqwest" -version = "0.12.28" +name = "rtc-sctp" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +checksum = "2eb430b379d90e7984306036d1646454a26b300c9c3256009eb8f7e0615e90b9" dependencies = [ - "base64 0.22.1", "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http 1.5.0", - "http-body 1.1.0", - "http-body-util", - "hyper 1.12.0", - "hyper-rustls", - "hyper-util", - "js-sys", + "crc32c", "log", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.2", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", + "rand 0.10.3", + "rtc-shared", + "rustc-hash", + "slab", + "thiserror 2.0.21", +] + +[[package]] +name = "rtc-sdp" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd69b1ea06978e045f374ec19eb34177ee4e4f8349cc7d9c0b183683fa7b2d1f" +dependencies = [ + "rand 0.10.3", + "rtc-shared", "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", ] [[package]] -name = "rfc6979" -version = "0.4.0" +name = "rtc-shared" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "1250e81796ac6d3d67bd04ecdb891b8371ff97c8a2ce0a5a1c1321f2e12b657b" dependencies = [ - "hmac", - "subtle", + "bitflags 1.3.2", + "bytes", + "nix", + "rand 0.10.3", + "serde", + "substring", + "thiserror 2.0.21", + "url", + "winapi", ] [[package]] -name = "ring" -version = "0.17.14" +name = "rtc-srtp" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "cbb71f476c84763db0435bc47a598acb31abc5fdc6ca3fc84dcb274ed9b70155" dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", + "byteorder", + "bytes", + "rtc-crypto", + "rtc-rtcp", + "rtc-rtp", + "rtc-shared", ] [[package]] -name = "rodio" +name = "rtc-stun" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40ecf59e742e03336be6a3d53755e789fd05a059fa22dfa0ed624722319e183" +checksum = "1e59e5c70b7900f537ded24cfee5fa476e8fdc186b90ced528611e441f4063b4" dependencies = [ - "cpal", - "dasp_sample", - "num-rational", - "symphonia", + "base64 0.22.1", + "bytes", + "crc", + "lazy_static", + "rand 0.10.3", + "rtc-crypto", + "rtc-shared", + "sansio", + "url", ] [[package]] -name = "rpassword" -version = "7.5.4" +name = "rtc-turn" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da316a15f47e3d053de9cb2c439650bd8fa4aaeb9365f2e5f27f492ff73c196" +checksum = "c53078a0696df5a3a5e4947bc550c5e903b59803b252f1d39062d637ebd3d17e" dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.61.2", + "bytes", + "log", + "rtc-crypto", + "rtc-shared", + "rtc-stun", + "sansio", ] [[package]] @@ -2172,6 +3075,24 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + [[package]] name = "rustix" version = "1.1.5" @@ -2199,6 +3120,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -2250,6 +3183,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sansio" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62751faa8bc286982334a082fe125184a29fc89d17775766e4f891b7d726980" + [[package]] name = "schannel" version = "0.1.30" @@ -2302,6 +3241,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" version = "1.0.229" @@ -2366,6 +3311,28 @@ dependencies = [ "serde", ] +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "digest 0.11.3", +] + [[package]] name = "sha2" version = "0.10.9" @@ -2374,7 +3341,7 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures 0.2.17", - "digest", + "digest 0.10.7", ] [[package]] @@ -2389,7 +3356,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -2470,6 +3437,15 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + [[package]] name = "subtle" version = "2.6.1" @@ -2660,6 +3636,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "synstructure" version = "0.14.0" @@ -2813,9 +3800,21 @@ dependencies = [ "mio", "pin-project-lite", "socket2 0.6.5", + "tokio-macros", "windows-sys 0.61.2", ] +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -2836,6 +3835,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17a073bfed563fa236697a068031408a93cd9522e08abf9933ead3e73411bd71" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.7.20" @@ -2991,12 +4006,36 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22" +dependencies = [ + "bytes", + "data-encoding", + "http 1.5.0", + "httparse", + "log", + "rand 0.10.3", + "rustls", + "rustls-pki-types", + "sha1 0.11.0", + "thiserror 2.0.21", +] + [[package]] name = "typenum" version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + [[package]] name = "unicode-ident" version = "1.0.27" @@ -3009,7 +4048,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "subtle", ] @@ -3043,6 +4082,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -3165,6 +4215,40 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webrtc" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b621e736302bef784948cc8d8099fd0a8fdb5757693c80a344ffbe38c49387d2" +dependencies = [ + "async-broadcast", + "async-channel", + "async-trait", + "bytes", + "event-listener", + "futures", + "log", + "quinn-udp 0.6.3", + "rtc", + "tokio", +] + +[[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.11" @@ -3174,6 +4258,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[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" version = "0.54.0" @@ -3457,6 +4547,51 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs 0.6.2", + "data-encoding", + "der-parser 9.0.0", + "lazy_static", + "nom", + "oid-registry 0.7.1", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "x509-parser" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" +dependencies = [ + "asn1-rs 0.7.2", + "data-encoding", + "der-parser 10.0.0", + "lazy_static", + "nom", + "oid-registry 0.8.1", + "ring", + "rusticata-macros", + "thiserror 2.0.21", + "time", +] + +[[package]] +name = "yasna" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" +dependencies = [ + "bit-vec", + "time", +] + [[package]] name = "yoke" version = "0.8.3" @@ -3477,7 +4612,7 @@ dependencies = [ "proc-macro2", "quote", "syn 3.0.9", - "synstructure", + "synstructure 0.14.0", ] [[package]] @@ -3518,7 +4653,7 @@ dependencies = [ "proc-macro2", "quote", "syn 3.0.9", - "synstructure", + "synstructure 0.14.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8a5893b..42a0040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,13 +19,21 @@ name = "bticino-easykit" path = "src/bin/cli.rs" [dependencies] +async-trait = "0.1" base64 = "0.22" +bytes = "1" clap = { version = "4", features = ["derive"] } dirs = "5" +env_logger = "0.11" fcm_receiver_rs = "0.1.1" +futures-util = "0.3" reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] } rpassword = "7" +rtc = { version = "0.21.1", default-features = false } serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2" +tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] } +tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } toml = "0.8" +webrtc = "0.21" diff --git a/src/bin/cli.rs b/src/bin/cli.rs index d22071b..d18beba 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -33,6 +33,15 @@ enum Cmd { }, /// Register for call notifications (FCM) and print them as they arrive Listen, + /// Live view of the external unit: saves video.h264 + audio.ogg + Live { + /// Seconds before hanging up + #[arg(long, default_value_t = 30)] + seconds: u64, + /// Output directory (default: ./live-) + #[arg(long)] + out: Option, + }, /// Stop call notifications to this computer (undoes `listen`) UnregisterPush, /// Show recent events: calls, door openings... (read-only) @@ -118,6 +127,24 @@ fn run(cli: Cli) -> Result<()> { println!(" extra_params: {:#}", p.extra_params); })?; } + Cmd::Live { seconds, out } => { + let h = pick_home(&mut c, None)?; + let bridge = h.bridge().ok_or_else(|| bticino_easykit::Error::Other("no bridge".into()))?.id.clone(); + let unit = h.by_kind(ModuleKind::ExternalUnit).next().map(|m| m.id.clone()); + let ice = bticino_easykit::call::ice_servers_from_turn(&c.turn()?); + let token = c.token()?; + let out = out.unwrap_or_else(|| format!("live-{}", unix_now()).into()); + println!("Live view from {} ({} ICE servers) -> {}", unit.as_deref().unwrap_or("default unit"), ice.len(), out.display()); + let log: bticino_easykit::call::Log = std::sync::Arc::new(|src, v| println!("[{src}] {v}")); + let rt = tokio::runtime::Runtime::new()?; + let report = rt.block_on(bticino_easykit::call::run( + token, + bticino_easykit::call::Mode::Live { device_id: bridge, module_id: unit }, + bticino_easykit::call::CallOptions { out_dir: out, max_duration: std::time::Duration::from_secs(seconds), ice_servers: ice }, + log, + ))?; + println!("{}", serde_json::to_string_pretty(&report).unwrap_or_default()); + } Cmd::UnregisterPush => match bticino_easykit::push::drop_push_context(&mut c)? { Some(r) => println!("droppushcontext: {r}"), None => println!("No push registration saved."), @@ -134,7 +161,13 @@ fn run(cli: Cli) -> Result<()> { Ok(()) } +fn unix_now() -> u64 { + std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0) +} + fn main() -> ExitCode { + // RUST_LOG=webrtc=debug,rtc=debug shows ICE/DTLS internals. + let _ = env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("off")).try_init(); match run(Cli::parse()) { Ok(()) => ExitCode::SUCCESS, Err(e) => { diff --git a/src/call.rs b/src/call.rs new file mode 100644 index 0000000..cc07bde --- /dev/null +++ b/src/call.rs @@ -0,0 +1,493 @@ +//! WebRTC video/audio calls with the external unit. +//! +//! Two modes, as in the official app: +//! - **live**: we send an offer on the signaling WebSocket (`/appws/`) and +//! the device answers (`p30.g`); +//! - **answer**: the device rang and pushed its offer (`*-rtc`, over FCM on +//! EASYKIT); we answer it (`p30.i`). +//! +//! The firmware stamps fixed payload types (Opus 111, H264 109), so the +//! media engine registers exactly those. A local audio track sending Opus +//! silence is added like the app does; without it the device keeps its +//! microphone off. + +use std::fs::File; +use std::path::PathBuf; +use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; + +use bytes::Bytes; +use futures_util::{SinkExt, StreamExt}; +use rtc::interceptor::Registry; +use rtc::media::io::h26x_writer::H26xWriter; +use rtc::media::io::ogg_writer::OggWriter; +use rtc::media::io::Writer; +use rtc::media::Sample; +use rtc::media_stream::MediaStreamTrack; +use rtc::peer_connection::configuration::interceptor_registry::register_default_interceptors; +use rtc::peer_connection::configuration::media_engine::{MediaEngine, MIME_TYPE_H264, MIME_TYPE_OPUS}; +use rtc::peer_connection::configuration::RTCConfigurationBuilder; +use rtc::peer_connection::sdp::RTCSessionDescription; +use rtc::peer_connection::transport::{RTCIceCandidateInit, RTCIceServer}; +use rtc::rtcp::payload_feedbacks::picture_loss_indication::PictureLossIndication; +use rtc::rtp_transceiver::rtp_sender::{ + RTCRtpCodec, RTCRtpCodecParameters, RTCRtpCodingParameters, RTCRtpEncodingParameters, RtpCodecKind, +}; +use rtc::rtp_transceiver::{RTCRtpTransceiverDirection, RTCRtpTransceiverInit}; +use serde_json::{json, Value}; +use tokio::sync::{mpsc, Notify}; +use tokio_tungstenite::tungstenite::Message; +use webrtc::media_stream::track_local::static_sample::TrackLocalStaticSample; +use webrtc::media_stream::track_local::TrackLocal; +use webrtc::media_stream::track_remote::{TrackRemote, TrackRemoteEvent}; +use webrtc::peer_connection::{ + PeerConnection, PeerConnectionBuilder, PeerConnectionEventHandler, RTCIceGatheringState, RTCPeerConnectionState, +}; +use webrtc::runtime::default_runtime; + +use crate::protocol::{self as p, RtcSession}; + +/// Event sink: `(source, message)`. Used for the session log. +pub type Log = Arc; + +pub const OPUS_PT: u8 = 111; +pub const H264_PT: u8 = 109; +/// One 20 ms Opus frame of silence. +const OPUS_SILENCE: [u8; 3] = [0xF8, 0xFF, 0xFE]; + +pub enum Mode { + Live { device_id: String, module_id: Option }, + Answer { session: RtcSession, offer_sdp: String }, +} + +pub struct CallOptions { + pub out_dir: PathBuf, + /// Hang up after this long (if the device has not already). + pub max_duration: Duration, + pub ice_servers: Vec, +} + +#[derive(Debug, Default, Clone, serde::Serialize)] +pub struct CallReport { + pub session_id: Option, + pub connected_after_ms: Option, + pub video_packets: u64, + pub video_bytes: u64, + pub audio_packets: u64, + pub ended_by: String, + pub duration_ms: u64, +} + +/// Converts the `iceServers` returned by `getcredentials`. +pub fn ice_servers_from_turn(resp: &Value) -> Vec { + let body = if resp["body"].is_object() { &resp["body"] } else { resp }; + body["iceServers"] + .as_array() + .map(|a| { + a.iter() + .map(|s| RTCIceServer { + urls: match &s["urls"] { + Value::Array(u) => u.iter().filter_map(|x| x.as_str().map(str::to_owned)).collect(), + Value::String(u) => vec![u.clone()], + _ => vec![], + }, + username: s["username"].as_str().unwrap_or_default().to_owned(), + credential: s["credential"].as_str().unwrap_or_default().to_owned(), + }) + .collect() + }) + .unwrap_or_default() +} + +fn codecs() -> (RTCRtpCodecParameters, RTCRtpCodecParameters) { + let audio = RTCRtpCodecParameters { + rtp_codec: RTCRtpCodec { + mime_type: MIME_TYPE_OPUS.to_owned(), + clock_rate: 48000, + channels: 2, + sdp_fmtp_line: "minptime=10;useinbandfec=1".to_owned(), + rtcp_feedback: vec![], + }, + payload_type: OPUS_PT, + }; + let video = RTCRtpCodecParameters { + rtp_codec: RTCRtpCodec { + mime_type: MIME_TYPE_H264.to_owned(), + clock_rate: 90000, + channels: 0, + sdp_fmtp_line: "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f".to_owned(), + rtcp_feedback: vec![], + }, + payload_type: H264_PT, + }; + (audio, video) +} + +struct Handler { + log: Log, + started: Instant, + gathered: Arc, + state_tx: mpsc::UnboundedSender, + cand_tx: mpsc::UnboundedSender, + video: Arc>>>, + audio: Arc>>>, + stats: Arc, +} + +#[derive(Default)] +struct Stats { + video_packets: AtomicU64, + video_bytes: AtomicU64, + audio_packets: AtomicU64, + connected_ms: AtomicU64, +} + +#[async_trait::async_trait] +impl PeerConnectionEventHandler for Handler { + async fn on_ice_gathering_state_change(&self, state: RTCIceGatheringState) { + if state == RTCIceGatheringState::Complete { + self.gathered.notify_one(); + } + } + + async fn on_ice_candidate(&self, event: webrtc::peer_connection::RTCPeerConnectionIceEvent) { + // The app forwards UDP candidates only, never loopback ones. + if let Ok(init) = event.candidate.to_json() { + let c = init.candidate; + if c.contains(" udp ") && !c.contains(" 127.") { + let _ = self.cand_tx.send(c); + } + } + } + + async fn on_connection_state_change(&self, state: RTCPeerConnectionState) { + (self.log)("webrtc", &json!({ "connection_state": state.to_string() })); + if state == RTCPeerConnectionState::Connected { + self.stats.connected_ms.store(self.started.elapsed().as_millis() as u64, Ordering::Relaxed); + } + let _ = self.state_tx.send(state); + } + + async fn on_track(&self, track: Arc) { + let kind = track.kind().await; + (self.log)("webrtc", &json!({ "track": format!("{kind}") })); + let stats = self.stats.clone(); + if kind == RtpCodecKind::Video { + if let Some(ssrc) = track.ssrcs().await.first().copied() { + let pli = track.clone(); + tokio::spawn(async move { + loop { + tokio::time::sleep(Duration::from_secs(2)).await; + let pkt = PictureLossIndication { sender_ssrc: 0, media_ssrc: ssrc }; + if pli.write_rtcp(vec![Box::new(pkt)]).await.is_err() { + break; + } + } + }); + } + let w = self.video.clone(); + tokio::spawn(async move { + while let Some(ev) = track.poll().await { + if let TrackRemoteEvent::OnRtpPacket(pkt) = ev { + stats.video_packets.fetch_add(1, Ordering::Relaxed); + stats.video_bytes.fetch_add(pkt.payload.len() as u64, Ordering::Relaxed); + if let Some(w) = w.lock().unwrap().as_mut() { + let _ = w.write_rtp(&pkt); + } + } + } + }); + } else { + let w = self.audio.clone(); + tokio::spawn(async move { + while let Some(ev) = track.poll().await { + if let TrackRemoteEvent::OnRtpPacket(pkt) = ev { + stats.audio_packets.fetch_add(1, Ordering::Relaxed); + if let Some(w) = w.lock().unwrap().as_mut() { + let _ = w.write_rtp(&pkt); + } + } + } + }); + } + } +} + +type Ws = tokio_tungstenite::WebSocketStream>; + +/// Opens `/appws/` and subscribes. +async fn connect_signaling(token: &str, log: &Log) -> crate::Result { + let (mut ws, _) = tokio_tungstenite::connect_async(p::SIGNALING_WS_URL) + .await + .map_err(|e| crate::Error::Other(format!("signaling connect: {e}")))?; + ws.send(Message::Text(p::signaling_subscribe(token).to_string().into())) + .await + .map_err(|e| crate::Error::Other(format!("signaling send: {e}")))?; + let first = tokio::time::timeout(Duration::from_secs(20), ws.next()) + .await + .map_err(|_| crate::Error::Other("signaling subscribe timeout".into()))?; + let v = match first { + Some(Ok(Message::Text(t))) => serde_json::from_str::(&t).unwrap_or(Value::Null), + other => return Err(crate::Error::Other(format!("signaling subscribe: {other:?}"))), + }; + log("signaling<", &v); + if v["status"] != "ok" { + return Err(crate::Error::Other(format!("signaling subscribe rejected: {v}"))); + } + Ok(ws) +} + +async fn send(ws: &mut Ws, log: &Log, v: Value) -> crate::Result<()> { + let mut shown = v.clone(); + if let Some(sdp) = shown["data"]["session_description"]["sdp"].as_str() { + shown["data"]["session_description"]["sdp"] = json!(format!("<{} bytes>", sdp.len())); + } + log("signaling>", &shown); + ws.send(Message::Text(v.to_string().into())) + .await + .map_err(|e| crate::Error::Other(format!("signaling send: {e}"))) +} + +/// Runs one call until the device hangs up, the connection fails or +/// `max_duration` elapses. Media is written to `out_dir/{video.h264,audio.ogg}`. +pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crate::Result { + let started = Instant::now(); + let other = |e: webrtc::error::Error| crate::Error::Other(format!("webrtc: {e}")); + std::fs::create_dir_all(&opts.out_dir)?; + let video = Arc::new(Mutex::new(Some(H26xWriter::new(File::create(opts.out_dir.join("video.h264"))?, false)))); + let audio = Arc::new(Mutex::new(Some( + OggWriter::new(File::create(opts.out_dir.join("audio.ogg"))?, 48000, 2).map_err(|e| crate::Error::Other(e.to_string()))?, + ))); + + let (audio_codec, video_codec) = codecs(); + let mut me = MediaEngine::default(); + me.register_codec(audio_codec.clone(), RtpCodecKind::Audio).map_err(other)?; + me.register_codec(video_codec, RtpCodecKind::Video).map_err(other)?; + let registry = register_default_interceptors(Registry::new(), &mut me).map_err(other)?; + let config = RTCConfigurationBuilder::new().with_ice_servers(opts.ice_servers.clone()).build(); + + let gathered = Arc::new(Notify::new()); + let (state_tx, mut state_rx) = mpsc::unbounded_channel(); + let (cand_tx, mut cand_rx) = mpsc::unbounded_channel::(); + let mut pending_cands: Vec = Vec::new(); + // Live: candidates may only follow the device answer ("Received ICE + // candidate before answer", code 13). Answer mode: right away. + let mut can_trickle = false; + let stats = Arc::new(Stats::default()); + let handler = Arc::new(Handler { + log: log.clone(), + started, + gathered: gathered.clone(), + state_tx, + cand_tx, + video: video.clone(), + audio: audio.clone(), + stats: stats.clone(), + }); + let runtime = default_runtime().ok_or_else(|| crate::Error::Other("no async runtime".into()))?; + let pc = PeerConnectionBuilder::new() + .with_configuration(config) + .with_media_engine(me) + .with_interceptor_registry(registry) + .with_handler(handler as Arc) + .with_runtime(runtime) + .with_udp_addrs(vec!["0.0.0.0:0"]) + .build() + .await + .map_err(other)?; + + let mut ws = connect_signaling(&token, &log).await?; + + // Local audio track (silence) and, in live mode, a receive-only video. + let ssrc: u32 = rand_u32(); + let mic = Arc::new( + TrackLocalStaticSample::new( + Instant::now(), + MediaStreamTrack::new( + "bticino-easykit".into(), + "ARDAMSa0".into(), + "ARDAMSa0".into(), + RtpCodecKind::Audio, + vec![RTCRtpEncodingParameters { + rtp_coding_parameters: RTCRtpCodingParameters { ssrc: Some(ssrc), ..Default::default() }, + codec: audio_codec.rtp_codec.clone(), + ..Default::default() + }], + ), + ) + .map_err(other)?, + ); + + let mut session = match mode { + Mode::Live { device_id, module_id } => { + pc.add_track(mic.clone() as Arc).await.map_err(other)?; + pc.add_transceiver_from_kind( + RtpCodecKind::Video, + Some(RTCRtpTransceiverInit { direction: RTCRtpTransceiverDirection::Recvonly, ..Default::default() }), + ) + .await + .map_err(other)?; + let offer = pc.create_offer(None).await.map_err(other)?; + pc.set_local_description(offer).await.map_err(other)?; + let _ = tokio::time::timeout(Duration::from_secs(5), gathered.notified()).await; + let sdp = pc.local_description().await.map(|d| d.sdp).unwrap_or_default(); + let _ = std::fs::write(opts.out_dir.join("sdp-local.txt"), &sdp); + let corr = (std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap_or_default().as_millis()).to_string(); + send(&mut ws, &log, p::rtc_offer(&device_id, &corr, &sdp, module_id.as_deref())).await?; + RtcSession { session_id: String::new(), tag_id: String::new(), device_id, correlation_id: corr } + } + Mode::Answer { session, offer_sdp } => { + let _ = std::fs::write(opts.out_dir.join("sdp-remote.txt"), &offer_sdp); + pc.set_remote_description(RTCSessionDescription::offer(offer_sdp).map_err(other)?).await.map_err(other)?; + pc.add_track(mic.clone() as Arc).await.map_err(other)?; + let answer = pc.create_answer(None).await.map_err(other)?; + pc.set_local_description(answer).await.map_err(other)?; + let _ = tokio::time::timeout(Duration::from_secs(5), gathered.notified()).await; + let sdp = pc.local_description().await.map(|d| d.sdp).unwrap_or_default(); + let _ = std::fs::write(opts.out_dir.join("sdp-local.txt"), &sdp); + send(&mut ws, &log, p::rtc_answer(&session, &sdp)).await?; + can_trickle = true; + session + } + }; + + // Silence on the local audio track, every 20 ms, once media can flow. + let connected = Arc::new(Notify::new()); + let mic_task = { + let mic = mic.clone(); + let connected = connected.clone(); + tokio::spawn(async move { + connected.notified().await; + let mut tick = tokio::time::interval(Duration::from_millis(20)); + loop { + tick.tick().await; + let s = Sample { + data: Bytes::from_static(&OPUS_SILENCE), + duration: Duration::from_millis(20), + ..Sample::new(Instant::now()) + }; + if mic.sample_writer(ssrc, OPUS_PT).write_sample(&s).await.is_err() { + break; + } + } + }) + }; + + let deadline = tokio::time::sleep(opts.max_duration); + tokio::pin!(deadline); + let ended_by = loop { + tokio::select! { + _ = &mut deadline => break "timeout (we hung up)".to_owned(), + Some(c) = cand_rx.recv() => { + // Trickle ICE: the device sends none of its own and needs ours + // on the signaling channel once the session ids are known. + if !can_trickle { + pending_cands.push(c); + } else { + send(&mut ws, &log, p::rtc_candidate(&session, &c, 0)).await?; + } + } + st = state_rx.recv() => match st { + Some(RTCPeerConnectionState::Connected) => connected.notify_one(), + Some(RTCPeerConnectionState::Failed) => break "webrtc failed".to_owned(), + Some(RTCPeerConnectionState::Closed) => break "webrtc closed".to_owned(), + None => break "webrtc gone".to_owned(), + _ => {} + }, + msg = ws.next() => { + let v = match msg { + Some(Ok(Message::Text(t))) => serde_json::from_str::(&t).unwrap_or(Value::Null), + Some(Ok(Message::Close(c))) => break format!("signaling closed {c:?}"), + Some(Ok(_)) => continue, + Some(Err(e)) => break format!("signaling error {e}"), + None => break "signaling ended".to_owned(), + }; + let mut shown = v.clone(); + if let Some(sdp) = shown["data"]["session_description"]["sdp"].as_str() { + shown["data"]["session_description"]["sdp"] = json!(format!("<{} bytes>", sdp.len())); + } + log("signaling<", &shown); + if v["type"] == "ack" { + // Only the offer ack carries ids; later acks have nulls. + if let Some(s) = v["session_id"].as_str() { session.session_id = s.to_owned(); } + if let Some(t) = v["tag_id"].as_str() { session.tag_id = t.to_owned(); } + continue; + } + match v["data"]["type"].as_str() { + Some("answer") => { + let sdp = v["data"]["session_description"]["sdp"].as_str().unwrap_or_default().to_owned(); + let _ = std::fs::write(opts.out_dir.join("sdp-remote.txt"), &sdp); + if let Err(e) = async { pc.set_remote_description(RTCSessionDescription::answer(sdp)?).await }.await { + break format!("bad answer: {e}"); + } + can_trickle = true; + for c in std::mem::take(&mut pending_cands) { + send(&mut ws, &log, p::rtc_candidate(&session, &c, 0)).await?; + } + } + Some("candidate") => { + let c = &v["data"]["ice_candidate"]; + let init = RTCIceCandidateInit { + candidate: c["candidate"].as_str().unwrap_or_default().to_owned(), + sdp_mline_index: c["sdp_m_line_index"].as_u64().map(|i| i as u16), + ..Default::default() + }; + if let Err(e) = pc.add_ice_candidate(init).await { + log("webrtc", &json!({ "add_ice_candidate_error": e.to_string() })); + } + } + Some(t @ ("terminate" | "rescind")) => break format!("device {t}: {}", v["data"]["error"]), + _ => {} + } + } + } + }; + + if !session.session_id.is_empty() && !ended_by.starts_with("device") { + let _ = send(&mut ws, &log, p::rtc_terminate(&session)).await; + } + mic_task.abort(); + let _ = pc.close().await; + if let Some(mut w) = video.lock().unwrap().take() { + let _ = w.close(); + } + if let Some(mut w) = audio.lock().unwrap().take() { + let _ = w.close(); + } + let connected = stats.connected_ms.load(Ordering::Relaxed); + Ok(CallReport { + session_id: (!session.session_id.is_empty()).then_some(session.session_id), + connected_after_ms: (connected > 0).then_some(connected), + video_packets: stats.video_packets.load(Ordering::Relaxed), + video_bytes: stats.video_bytes.load(Ordering::Relaxed), + audio_packets: stats.audio_packets.load(Ordering::Relaxed), + ended_by, + duration_ms: started.elapsed().as_millis() as u64, + }) +} + +fn rand_u32() -> u32 { + use std::hash::{BuildHasher, Hasher}; + let mut h = std::collections::hash_map::RandomState::new().build_hasher(); + h.write_u128(Instant::now().elapsed().as_nanos()); + h.finish() as u32 +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn turn_response_to_ice_servers() { + let v = json!({"body":{"iceServers":[ + {"urls":["turn:a:3478?transport=udp","stun:a:3478"],"username":"u","credential":"c"}, + {"urls":"stun:b"} + ]}}); + let s = ice_servers_from_turn(&v); + assert_eq!(s.len(), 2); + assert_eq!(s[0].urls.len(), 2); + assert_eq!(s[0].credential, "c"); + assert_eq!(s[1].urls, vec!["stun:b".to_owned()]); + } +} diff --git a/src/client.rs b/src/client.rs index 7a61ff2..5321d7a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -210,6 +210,24 @@ impl Client { self.post(p::GETCONFIGS_PATH, &p::getconfigs(home_id, module_ids)) } + /// TURN/STUN servers for WebRTC (`getcredentials`). + pub fn turn(&mut self) -> Result { + let token = self.access_token()?; + if debug_enabled() { + eprintln!(">> POST {}", p::TURN_URL); + } + let resp = self.http.post(p::TURN_URL).bearer_auth(token).json(&p::turn_request()).send()?; + let status = resp.status().as_u16(); + let text = resp.text()?; + if debug_enabled() { + eprintln!("<< {status} {}", redact(&text)); + } + if status >= 400 { + return Err(Error::Api { status, body: text }); + } + serde_json::from_str(&text).map_err(|e| Error::Other(e.to_string())) + } + pub fn set_state(&mut self, home: &Home, module_id: &str, state: Value) -> Result { let bridge = home .module(module_id) diff --git a/src/lib.rs b/src/lib.rs index 9a08a5e..0b0d35e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ //! Unofficial client library for the BTicino EASYKIT WiFi video door //! entry kit (and other BTicino intercoms on the Netatmo cloud). +pub mod call; pub mod client; pub mod model; pub mod protocol; diff --git a/src/protocol.rs b/src/protocol.rs index 93367fa..280453f 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -152,6 +152,91 @@ pub fn push_subscribe(access_token: &str) -> Value { }) } +/// TURN/STUN credentials for WebRTC (POST, JSON body). +pub const TURN_URL: &str = "https://app-turn.netatmo.net/api/getcredentials"; + +pub fn turn_request() -> Value { + json!({ "client_type": "user" }) +} + +/// First message on the signaling WebSocket (`p30.h` in the app). +pub fn signaling_subscribe(access_token: &str) -> Value { + json!({ + "action": "subscribe", + "access_token": access_token, + "app_type": "app_security", + "version": "1.0", + "platform": "android", + }) +} + +/// Identifies one WebRTC session once the server or a push assigned it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RtcSession { + pub session_id: String, + pub tag_id: String, + pub device_id: String, + pub correlation_id: String, +} + +/// Live view offer (`p30.g`): `module_id` selects the external unit. +pub fn rtc_offer(device_id: &str, correlation_id: &str, sdp: &str, module_id: Option<&str>) -> Value { + let mut sd = json!({ "type": "call", "sdp": sdp }); + if let Some(m) = module_id { + sd["module_id"] = json!(m); + } + json!({ + "action": "rtc", + "data": { "type": "offer", "session_description": sd }, + "device_id": device_id, + "correlation_id": correlation_id, + }) +} + +fn rtc_in_session(s: &RtcSession, data: Value) -> Value { + json!({ + "action": "rtc", + "data": data, + "session_id": s.session_id, + "tag_id": s.tag_id, + "device_id": s.device_id, + "correlation_id": s.correlation_id, + }) +} + +/// Answer to a device offer received as a `*-rtc` push (`p30.i`). +pub fn rtc_answer(s: &RtcSession, sdp: &str) -> Value { + rtc_in_session(s, json!({ "type": "answer", "session_description": { "type": "call", "sdp": sdp } })) +} + +/// Trickle ICE candidate (`p30.n`). +pub fn rtc_candidate(s: &RtcSession, candidate: &str, sdp_m_line_index: u16) -> Value { + rtc_in_session( + s, + json!({ "type": "candidate", "ice_candidate": { "sdp_m_line_index": sdp_m_line_index, "candidate": candidate } }), + ) +} + +/// Hang up (`p30.k`). +pub fn rtc_terminate(s: &RtcSession) -> Value { + rtc_in_session(s, json!({ "type": "terminate" })) +} + +/// Session carried by a `*-rtc` offer push (`extra_params`). +pub fn session_from_push(extra_params: &Value) -> Option { + let g = |k: &str| match &extra_params[k] { + Value::String(s) => Some(s.clone()), + Value::Number(n) => Some(n.to_string()), + _ => None, + }; + Some(RtcSession { + session_id: g("session_id")?, + tag_id: g("tag_id")?, + device_id: g("device_id")?, + correlation_id: g("correlation_id").unwrap_or_else(|| "0".into()), + }) +} + #[cfg(test)] mod tests { use super::*; @@ -198,6 +283,35 @@ mod tests { ); } + fn sess() -> RtcSession { + RtcSession { session_id: "s".into(), tag_id: "t".into(), device_id: "d".into(), correlation_id: "7".into() } + } + + #[test] + fn offer_with_module() { + assert_eq!( + rtc_offer("d", "1", "v=0", Some("eu")).to_string(), + r#"{"action":"rtc","correlation_id":"1","data":{"session_description":{"module_id":"eu","sdp":"v=0","type":"call"},"type":"offer"},"device_id":"d"}"# + ); + } + + #[test] + fn answer_candidate_terminate_carry_session() { + assert_eq!( + rtc_answer(&sess(), "v=0").to_string(), + r#"{"action":"rtc","correlation_id":"7","data":{"session_description":{"sdp":"v=0","type":"call"},"type":"answer"},"device_id":"d","session_id":"s","tag_id":"t"}"# + ); + assert_eq!(rtc_candidate(&sess(), "candidate:1", 0)["data"]["ice_candidate"]["sdp_m_line_index"], 0); + assert_eq!(rtc_terminate(&sess())["data"]["type"], "terminate"); + } + + #[test] + fn session_from_push_accepts_numeric_correlation() { + let ep = json!({"session_id":"s","tag_id":"t","device_id":"d","correlation_id":7}); + assert_eq!(session_from_push(&ep), Some(sess())); + assert_eq!(session_from_push(&json!({"session_id":"s"})), None); + } + #[test] fn push_subscribe_has_no_filter() { let v = push_subscribe("tok"); From 442719fb02d6dfc49792a65a9aa6fb4c6ae83526 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 15:30:08 +0200 Subject: [PATCH 03/17] Live video works: allow legacy RSA DTLS cert, force SRTP AES_CM profile Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 + docs/PROTOCOL.md | 23 +++++++++++++++++++++++ src/call.rs | 17 +++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/.gitignore b/.gitignore index ea8c4bf..f53996d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/captures diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 6c2f630..a84081d 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -129,6 +129,29 @@ Registration (`u10.d.d` / `u10.d.k`), JSON POST: Status: **[unverified]** until a ring is received with `bticino-easykit listen`. +## WebRTC live view on EASYKIT (observed 2026-10-21) + +**[verified]** on the maintainer's kit (fw 1.00.11): + +- `offer` with `module_id` of the `BNEU` → ack with `session_id`/`tag_id`, + then `answer` (GStreamer webrtcbin: `msid user…@host-…`, + `webrtctransceiver`, `setup:active`, H264 PT 109 profile `42e01f` + 15 fps with `sprop-parameter-sets`, Opus PT 111 `sprop-maxcapturerate=16000`). +- The answer carries **no ICE candidates**, and the device never trickles any. +- Client candidates sent before the answer are rejected with ack + `{"status":"error","error":{"code":13,"message":"Received ICE candidate before answer"}}`; + after the answer they are acked `ok`. +- Without a working media path the device sends `terminate` ~30 s after the offer. +- **Media works [verified]**: H264 640×480 ~15 fps + Opus 48 kHz, held for + the whole requested duration (no ~10 s cut-off). Requirements found the hard way: + 1. The device's DTLS certificate has an RSA key < 2048 bits; webrtc-rs rejects + its CertificateVerify (`ErrKeySignatureMismatch`) unless + `allow_insecure_verification_algorithm` is set (fingerprint check unchanged). + 2. With `SRTP_AEAD_AES_128_GCM` negotiated the handshake completes but the device + sends **no media at all**; offering only `SRTP_AES128_CM_HMAC_SHA1_80` fixes it. + 3. The device is DTLS client (`setup:active`) and only ever sees peer-reflexive + candidates for us; on the LAN the selected pair is direct host↔device. + ## WebRTC video/audio Signaling on `wss://app-ws.netatmo.net/appws/` (`app_type: app_security`), diff --git a/src/call.rs b/src/call.rs index cc07bde..8922842 100644 --- a/src/call.rs +++ b/src/call.rs @@ -27,6 +27,7 @@ use rtc::media::Sample; use rtc::media_stream::MediaStreamTrack; use rtc::peer_connection::configuration::interceptor_registry::register_default_interceptors; use rtc::peer_connection::configuration::media_engine::{MediaEngine, MIME_TYPE_H264, MIME_TYPE_OPUS}; +use rtc::peer_connection::configuration::setting_engine::SettingEngineBuilder; use rtc::peer_connection::configuration::RTCConfigurationBuilder; use rtc::peer_connection::sdp::RTCSessionDescription; use rtc::peer_connection::transport::{RTCIceCandidateInit, RTCIceServer}; @@ -214,6 +215,21 @@ impl PeerConnectionEventHandler for Handler { } } +/// DTLS/SRTP settings the EASYKIT needs: +/// - its certificate has an RSA key under 2048 bits, which rtc-dtls rejects +/// by default (`ErrKeySignatureMismatch` on CertificateVerify); the SDP +/// fingerprint check stays enabled; +/// - with `SRTP_AEAD_AES_128_GCM` negotiated (webrtc-rs's first choice) the +/// handshake completes but the device never sends media, so only +/// `SRTP_AES128_CM_HMAC_SHA1_80` is offered. +fn setting_engine() -> rtc::peer_connection::configuration::setting_engine::SettingEngine { + use rtc::dtls::extension::extension_use_srtp::SrtpProtectionProfile as P; + SettingEngineBuilder::new() + .with_allow_insecure_verification_algorithm(true) + .with_srtp_protection_profiles(vec![P::Srtp_Aes128_Cm_Hmac_Sha1_80]) + .build() +} + type Ws = tokio_tungstenite::WebSocketStream>; /// Opens `/appws/` and subscribes. @@ -289,6 +305,7 @@ pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crat let pc = PeerConnectionBuilder::new() .with_configuration(config) .with_media_engine(me) + .with_setting_engine(setting_engine()) .with_interceptor_registry(registry) .with_handler(handler as Arc) .with_runtime(runtime) From 58fbb384e3739537d61a6071d533c19294ac78ae Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 15:34:43 +0200 Subject: [PATCH 04/17] test-session: guided on-site test (ring, answer/record, confirmed unlocks); push WebSocket listener Co-Authored-By: Claude Opus 5.5 --- docs/PROTOCOL.md | 13 +- src/bin/cli.rs | 15 +++ src/bin/cli/session.rs | 276 +++++++++++++++++++++++++++++++++++++++++ src/client.rs | 27 ++++ src/push.rs | 67 +++++++++- 5 files changed, 396 insertions(+), 2 deletions(-) create mode 100644 src/bin/cli/session.rs diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index a84081d..f339978 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -127,7 +127,18 @@ Registration (`u10.d.d` / `u10.d.k`), JSON POST: /api/droppushcontext {"credentials":"{\"device_token\":\"\"}","type":"Android"} ``` -Status: **[unverified]** until a ring is received with `bticino-easykit listen`. +`addpushcontext` answers `{"status":"ok"}` with either JSON or form bodies +**[verified]**, but `droppushcontext` then answers 406 +`{"error":{"code":7,"message":"Nothing to drop"}}` for every variant tried +(JSON/form, with/without `app_type`). **[open]** + +FCM registration that works **[verified]**: GCM check-in, `register3` as +`org.chromium.linux` with a `wp:` subtype (retry on `PHONE_REGISTRATION_ERROR`), +Firebase Installation and `fcmregistrations` web registration, all with +`X-Android-Package`/`X-Android-Cert` (the API key is restricted to the app). +A pure Android `register3` is rejected with `FIS_AUTH_ERROR`. + +Delivery of call pushes to such a token: **[unverified]** until a ring. ## WebRTC live view on EASYKIT (observed 2026-10-21) diff --git a/src/bin/cli.rs b/src/bin/cli.rs index d18beba..cbcf753 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -4,6 +4,9 @@ use std::process::ExitCode; use bticino_easykit::{Client, Home, ModuleKind, Result}; use clap::{Parser, Subcommand}; +#[path = "cli/session.rs"] +mod session; + #[derive(Parser)] #[command(version, about = "Control a BTicino EASYKIT WiFi video door entry kit")] struct Cli { @@ -42,6 +45,17 @@ enum Cmd { #[arg(long)] out: Option, }, + /// Guided on-site test: ring, answer, record, open each lock (asks first) + TestSession { + #[arg(long)] + out: Option, + /// Minutes to wait for the ring + #[arg(long, default_value_t = 10)] + wait_minutes: u64, + /// Countdown before each lock opens, after you confirm + #[arg(long, default_value_t = 10)] + unlock_delay: u64, + }, /// Stop call notifications to this computer (undoes `listen`) UnregisterPush, /// Show recent events: calls, door openings... (read-only) @@ -145,6 +159,7 @@ fn run(cli: Cli) -> Result<()> { ))?; println!("{}", serde_json::to_string_pretty(&report).unwrap_or_default()); } + Cmd::TestSession { out, wait_minutes, unlock_delay } => session::run(out, wait_minutes, unlock_delay)?, Cmd::UnregisterPush => match bticino_easykit::push::drop_push_context(&mut c)? { Some(r) => println!("droppushcontext: {r}"), None => println!("No push registration saved."), diff --git a/src/bin/cli/session.rs b/src/bin/cli/session.rs new file mode 100644 index 0000000..8a39c26 --- /dev/null +++ b/src/bin/cli/session.rs @@ -0,0 +1,276 @@ +//! `test-session`: every check that needs someone at the intercom, in one go. +//! +//! 1. registers for call pushes (FCM + push WebSocket) and logs everything; +//! 2. waits for a ring and answers it (or, if no SDP offer arrives, opens a +//! live view during the ring), recording video/audio; +//! 3. opens each door lock only after the user typed "pronto"/"ready" and a +//! visible countdown, then asks whether it really opened; +//! 4. removes the push registration and writes `summary.json`. + +use std::io::Write as _; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; + +use bticino_easykit::call::{self, CallOptions, Log, Mode}; +use bticino_easykit::push::{self, Push}; +use bticino_easykit::{protocol as p, Client, ModuleKind, Result}; +use serde_json::{json, Value}; + +fn italian() -> bool { + ["LC_ALL", "LC_MESSAGES", "LANG"] + .iter() + .find_map(|k| std::env::var(k).ok().filter(|v| !v.is_empty())) + .is_some_and(|v| v.starts_with("it")) +} + +fn tr<'a>(en: &'a str, it: &'a str) -> &'a str { + if italian() { + it + } else { + en + } +} + +fn say(msg: &str) { + println!("\n>>> {msg}"); +} + +async fn ask(prompt: String) -> String { + tokio::task::spawn_blocking(move || { + print!("{prompt} "); + let _ = std::io::stdout().flush(); + let mut s = String::new(); + let _ = std::io::stdin().read_line(&mut s); + s.trim().to_lowercase() + }) + .await + .unwrap_or_default() +} + +fn make_log(dir: &Path) -> Log { + let file = Arc::new(Mutex::new( + std::fs::OpenOptions::new().create(true).append(true).open(dir.join("events.jsonl")).ok(), + )); + let start = Instant::now(); + Arc::new(move |src: &str, v: &Value| { + let t = start.elapsed().as_secs_f32(); + let line = json!({ "t": t, "src": src, "msg": v }); + if let Some(f) = file.lock().unwrap().as_mut() { + let _ = writeln!(f, "{line}"); + } + let mut s = v.to_string(); + if s.len() > 160 { + s.truncate(160); + s.push('…'); + } + println!("[{t:7.1}s {src}] {s}"); + }) +} + +/// Runs a blocking API call off the async runtime. +async fn api( + c: &Arc>, + f: impl FnOnce(&mut Client) -> Result + Send + 'static, +) -> Result { + let c = c.clone(); + tokio::task::spawn_blocking(move || f(&mut c.lock().unwrap())) + .await + .map_err(|e| bticino_easykit::Error::Other(e.to_string()))? +} + +pub fn run(out: Option, wait_minutes: u64, unlock_delay: u64) -> Result<()> { + let dir = out.unwrap_or_else(|| format!("captures/session-{}", super::unix_now()).into()); + std::fs::create_dir_all(&dir)?; + // The blocking HTTP client must be created and dropped outside the + // async runtime, so it outlives it here. + let client = Arc::new(Mutex::new(Client::new()?)); + let rt = tokio::runtime::Runtime::new()?; + let r = rt.block_on(session(client.clone(), dir, wait_minutes, unlock_delay)); + drop(rt); + drop(client); + r +} + +async fn session(client: Arc>, dir: PathBuf, wait_minutes: u64, unlock_delay: u64) -> Result<()> { + let log = make_log(&dir); + let mut summary = json!({ "dir": dir.display().to_string() }); + + let home = api(&client, |c| { + c.homes()? + .into_iter() + .find(|h| h.bridge().is_some()) + .ok_or_else(|| bticino_easykit::Error::Other("no intercom found".into())) + }) + .await?; + let bridge = home.bridge().map(|b| b.id.clone()).unwrap_or_default(); + let unit = home.by_kind(ModuleKind::ExternalUnit).next().map(|m| m.id.clone()); + + // 1. Call pushes from both channels. + say(tr("Registering for call notifications…", "Registrazione alle notifiche di chiamata…")); + let (fcm, st, _) = tokio::task::spawn_blocking(push::load_or_register) + .await + .map_err(|e| bticino_easykit::Error::Other(e.to_string()))??; + let token = st.fcm_token.clone(); + let r = api(&client, move |c| push::add_push_context(c, &token)).await?; + log("addpushcontext", &r); + let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::<(String, Push)>(); + { + let tx = tx.clone(); + std::thread::spawn(move || { + let r = push::listen(fcm, move |p| { + let _ = tx.send(("fcm".into(), p)); + }); + eprintln!("FCM listener stopped: {r:?}"); + }); + } + { + let (wtx, mut wrx) = tokio::sync::mpsc::unbounded_channel(); + let c = client.clone(); + tokio::spawn(async move { + // Blocking HTTP is only safe off the async workers. + let r = push::listen_ws(move || tokio::task::block_in_place(|| c.lock().unwrap().token()), wtx).await; + eprintln!("push WebSocket stopped: {r:?}"); + }); + let tx = tx.clone(); + tokio::spawn(async move { + while let Some(p) = wrx.recv().await { + let _ = tx.send(("ws".into(), p)); + } + }); + } + + // 2. Ring and answer. + say(&format!( + "{} {wait_minutes} min.\n {}", + tr("Ready. Go to the entrance panel and RING THE DOORBELL. Waiting up to", "Pronto. Vai al posto esterno e SUONA IL CAMPANELLO. Aspetto fino a"), + tr( + "While the call is open (about 30 s), speak in front of the panel: the audio is recorded.", + "Durante la chiamata (circa 30 s) parla davanti al posto esterno: registro l'audio." + ), + )); + let deadline = Instant::now() + Duration::from_secs(wait_minutes * 60); + let mut ring: Option = None; + let mut offer: Option<(String, Push)> = None; + let mut pushes = Vec::new(); + loop { + let left = if let Some(t) = ring { + // Give the SDP offer a few seconds to follow the ring. + Duration::from_secs(8).saturating_sub(t.elapsed()) + } else { + deadline.saturating_duration_since(Instant::now()) + }; + if left.is_zero() { + break; + } + match tokio::time::timeout(left, rx.recv()).await { + Ok(Some((src, p))) => { + log(&format!("push:{src}"), &json!({ "push_type": p.push_type, "fields": p.fields, "extra_params": p.extra_params })); + pushes.push(json!({ "src": src, "push_type": p.push_type })); + if p.push_type.ends_with("-incoming_call") && ring.is_none() { + ring = Some(Instant::now()); + } + if p.rtc_type() == Some("offer") { + ring.get_or_insert_with(Instant::now); + offer = Some((src, p)); + break; + } + } + _ => break, + } + } + summary["pushes_until_call"] = json!(pushes); + summary["ring_received"] = json!(ring.is_some()); + + let ice = call::ice_servers_from_turn(&api(&client, |c| c.turn()).await?); + let token = api(&client, |c| c.token()).await?; + let opts = |sub: &str| CallOptions { + out_dir: dir.join(sub), + max_duration: Duration::from_secs(30), + ice_servers: ice.clone(), + }; + if let Some((src, p)) = offer { + say(tr("SDP offer received: answering the call from this PC…", "Offerta SDP ricevuta: rispondo alla chiamata da questo PC…")); + summary["offer_channel"] = json!(src); + let sdp = p.extra_params["data"]["session_description"]["sdp"].as_str().unwrap_or_default().to_owned(); + let report = match p::session_from_push(&p.extra_params) { + Some(session) => call::run(token.clone(), Mode::Answer { session, offer_sdp: sdp }, opts("answer"), log.clone()).await, + None => Err(bticino_easykit::Error::Other("offer push without session ids".into())), + }; + summary["answer"] = report_json(report); + } else if ring.is_some() { + say(tr( + "Ring received but no SDP offer: trying a live view during the ring…", + "Squillo ricevuto ma nessuna offerta SDP: provo la visione dal vivo durante lo squillo…", + )); + let report = call::run(token.clone(), Mode::Live { device_id: bridge.clone(), module_id: unit.clone() }, opts("live-during-ring"), log.clone()).await; + summary["live_during_ring"] = report_json(report); + } else { + say(tr("No ring received.", "Nessuno squillo ricevuto.")); + } + // Late pushes (missed/accepted call, terminate...) keep being logged. + while let Ok(Some((src, p))) = tokio::time::timeout(Duration::from_secs(3), rx.recv()).await { + log(&format!("push:{src}"), &json!({ "push_type": p.push_type, "extra_params": p.extra_params })); + } + + // 3. Door locks, one at a time, never without "ready". + let mut locks = Vec::new(); + for m in home.by_kind(ModuleKind::DoorLock) { + let name = if m.name.is_empty() { m.id.clone() } else { m.name.clone() }; + say(&format!( + "{} \"{name}\".\n {} {unlock_delay} s.\n {}", + tr("Next: OPEN", "Prossimo passo: APRO"), + tr( + "Go where you can see it, then type 'ready' (or 'skip') and Enter. It opens after a countdown of", + "Mettiti dove lo vedi, poi scrivi 'pronto' (oppure 'salta') e premi Invio. Si apre dopo un conto alla rovescia di", + ), + tr("Nothing is sent before you confirm.", "Non invio nulla prima della tua conferma."), + )); + let a = ask("> ".into()).await; + if !matches!(a.as_str(), "pronto" | "ready") { + locks.push(json!({ "id": m.id, "name": name, "result": "skipped" })); + continue; + } + for i in (1..=unlock_delay).rev() { + print!("\r {i:3} s "); + let _ = std::io::stdout().flush(); + tokio::time::sleep(Duration::from_secs(1)).await; + } + println!(); + say(&format!("{} \"{name}\" ADESSO / NOW", tr("Opening", "Apro"))); + let (h, id) = (home.clone(), m.id.clone()); + let r = api(&client, move |c| c.set_state(&h, &id, p::unlock_state())).await; + let sent = match &r { + Ok(v) => { + log("setstate", v); + json!({ "ok": true, "response": v }) + } + Err(e) => { + log("setstate", &json!({ "error": e.to_string() })); + json!({ "ok": false, "error": e.to_string() }) + } + }; + let seen = ask(tr("Did it open? (y/n)", "Si è aperto? (s/n)").to_owned()).await; + locks.push(json!({ "id": m.id, "name": name, "sent": sent, "user_saw_open": seen.starts_with('s') || seen.starts_with('y') })); + } + summary["locks"] = json!(locks); + + // 4. Cleanup. + let r = api(&client, push::drop_push_context).await; + summary["droppushcontext"] = match r { + Ok(v) => json!(v), + Err(e) => json!({ "error": e.to_string() }), + }; + let s = serde_json::to_string_pretty(&summary).unwrap_or_default(); + std::fs::write(dir.join("summary.json"), &s)?; + say(tr("Done. Summary:", "Finito. Riepilogo:")); + println!("{s}"); + Ok(()) +} + +fn report_json(r: Result) -> Value { + match r { + Ok(rep) => serde_json::to_value(rep).unwrap_or(Value::Null), + Err(e) => json!({ "error": e.to_string() }), + } +} diff --git a/src/client.rs b/src/client.rs index 5321d7a..a315f14 100644 --- a/src/client.rs +++ b/src/client.rs @@ -190,6 +190,33 @@ impl Client { } } + /// Authenticated form-encoded POST (the app's `a40.a` parameter maps). + pub fn post_form(&mut self, path: &str, form: &[(&str, String)]) -> Result { + let mut retried = false; + loop { + let token = self.access_token()?; + let url = format!("{}{}", p::BASE_URL, path); + if debug_enabled() { + eprintln!(">> POST {url} (form) {:?}", form.iter().map(|(k, _)| *k).collect::>()); + } + let resp = self.http.post(&url).bearer_auth(token).form(form).send()?; + let status = resp.status().as_u16(); + let text = resp.text()?; + if debug_enabled() { + eprintln!("<< {status} {}", redact(&text)); + } + if (status == 401 || status == 403) && !retried { + retried = true; + self.refresh()?; + continue; + } + if status >= 400 { + return Err(Error::Api { status, body: text }); + } + return serde_json::from_str(&text).map_err(|e| Error::Other(e.to_string())); + } + } + pub fn homesdata_raw(&mut self) -> Result { self.post(p::HOMESDATA_PATH, &p::homesdata()) } diff --git a/src/push.rs b/src/push.rs index 6b5bf4c..d619723 100644 --- a/src/push.rs +++ b/src/push.rs @@ -47,6 +47,23 @@ impl Push { Self { push_type, extra_params, fields } } + /// Message from the push WebSocket: `{"type":"Websocket","push_type":…,"extra_params":{…}}`. + pub fn from_ws(v: &Value) -> Self { + let mut fields = BTreeMap::new(); + if let Some(o) = v.as_object() { + for (k, x) in o { + if k != "extra_params" { + fields.insert(k.clone(), x.as_str().map(str::to_owned).unwrap_or_else(|| x.to_string())); + } + } + } + Self { + push_type: v["push_type"].as_str().unwrap_or_default().to_owned(), + extra_params: v["extra_params"].clone(), + fields, + } + } + /// Decrypted web push: `{"data": {"push_type": ..., "extra_params": ...}, ...}`. pub fn from_webpush(bytes: &[u8]) -> Self { let v: Value = serde_json::from_slice(bytes).unwrap_or(Value::Null); @@ -211,7 +228,13 @@ pub fn drop_push_context(api: &mut Client) -> Result> { else { return Ok(None); }; - let r = api.post(p::DROPPUSHCONTEXT_PATH, &p::droppushcontext(&st.fcm_token))?; + // The cloud answers 406 `{"code":7,"message":"Nothing to drop"}` even + // right after a successful add, with JSON or form bodies alike; treat it + // as done and forget the local identity anyway. + let r = match api.post(p::DROPPUSHCONTEXT_PATH, &p::droppushcontext(&st.fcm_token)) { + Err(Error::Api { status: 406, body }) => serde_json::from_str(&body).unwrap_or(Value::Null), + other => other?, + }; std::fs::remove_file(state_path())?; Ok(Some(r)) } @@ -228,6 +251,40 @@ pub fn listen(mut c: FcmClient, on_push: impl Fn(Push) + Send + Sync + 'static) c.start_listening().map_err(|e| Error::Other(format!("FCM listen: {e}"))) } +/// Listens on the push WebSocket (`app_camera`, no filter) and forwards +/// every message. Re-subscribes with a fresh token every 50 minutes. +pub async fn listen_ws( + mut token: impl FnMut() -> Result + Send, + tx: tokio::sync::mpsc::UnboundedSender, +) -> Result<()> { + use futures_util::{SinkExt, StreamExt}; + use tokio_tungstenite::tungstenite::Message; + let (mut ws, _) = tokio_tungstenite::connect_async(p::PUSH_WS_URL) + .await + .map_err(|e| Error::Other(format!("push ws: {e}")))?; + let subscribe = |t: String| Message::Text(p::push_subscribe(&t).to_string().into()); + ws.send(subscribe(token()?)).await.map_err(|e| Error::Other(e.to_string()))?; + let mut resub = tokio::time::interval(std::time::Duration::from_secs(50 * 60)); + resub.tick().await; + loop { + tokio::select! { + _ = resub.tick() => { + ws.send(subscribe(token()?)).await.map_err(|e| Error::Other(e.to_string()))?; + } + m = ws.next() => match m { + Some(Ok(Message::Text(t))) => { + if let Ok(v) = serde_json::from_str::(&t) { + let _ = tx.send(Push::from_ws(&v)); + } + } + Some(Ok(Message::Close(_))) | None => return Err(Error::Other("push ws closed".into())), + Some(Err(e)) => return Err(Error::Other(format!("push ws: {e}"))), + _ => {} + } + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -253,6 +310,14 @@ mod tests { assert_eq!(p.rtc_type(), Some("terminate")); } + #[test] + fn parses_ws_message() { + let v = serde_json::json!({"type":"Websocket","push_type":"BDIY-incoming_call","extra_params":{"session_id":"s"}}); + let p = Push::from_ws(&v); + assert_eq!(p.push_type, "BDIY-incoming_call"); + assert_eq!(p.extra_params["session_id"], "s"); + } + #[test] fn non_rtc_push_has_no_rtc_type() { let mut f = BTreeMap::new(); From b257cc31d432a7ecbcf078c901830542d354ba43 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 17:53:01 +0200 Subject: [PATCH 05/17] test-session: --answers-dir for remote confirmations Co-Authored-By: Claude Opus 5.5 --- src/bin/cli.rs | 7 ++++++- src/bin/cli/session.rs | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/bin/cli.rs b/src/bin/cli.rs index cbcf753..c12b0d5 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -55,6 +55,9 @@ enum Cmd { /// Countdown before each lock opens, after you confirm #[arg(long, default_value_t = 10)] unlock_delay: u64, + /// Read confirmations from /answer-N files instead of the terminal + #[arg(long)] + answers_dir: Option, }, /// Stop call notifications to this computer (undoes `listen`) UnregisterPush, @@ -159,7 +162,9 @@ fn run(cli: Cli) -> Result<()> { ))?; println!("{}", serde_json::to_string_pretty(&report).unwrap_or_default()); } - Cmd::TestSession { out, wait_minutes, unlock_delay } => session::run(out, wait_minutes, unlock_delay)?, + Cmd::TestSession { out, wait_minutes, unlock_delay, answers_dir } => { + session::run(out, wait_minutes, unlock_delay, answers_dir)? + } Cmd::UnregisterPush => match bticino_easykit::push::drop_push_context(&mut c)? { Some(r) => println!("droppushcontext: {r}"), None => println!("No push registration saved."), diff --git a/src/bin/cli/session.rs b/src/bin/cli/session.rs index 8a39c26..1d6e53e 100644 --- a/src/bin/cli/session.rs +++ b/src/bin/cli/session.rs @@ -36,7 +36,26 @@ fn say(msg: &str) { println!("\n>>> {msg}"); } +/// With `--answers-dir`, answers come from files instead of the terminal: +/// question N waits for `/answer-N` (e.g. written by an assistant +/// relaying the user's replies from a phone). Otherwise stdin is used. +static ANSWERS: std::sync::OnceLock> = std::sync::OnceLock::new(); +static ASKED: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); + async fn ask(prompt: String) -> String { + if let Some(Some(dir)) = ANSWERS.get() { + let n = ASKED.fetch_add(1, std::sync::atomic::Ordering::SeqCst) + 1; + let f = dir.join(format!("answer-{n}")); + println!("{prompt} [waiting for {}]", f.display()); + loop { + if let Ok(s) = std::fs::read_to_string(&f) { + let a = s.trim().to_lowercase(); + println!(" <- {a}"); + return a; + } + tokio::time::sleep(Duration::from_millis(300)).await; + } + } tokio::task::spawn_blocking(move || { print!("{prompt} "); let _ = std::io::stdout().flush(); @@ -79,7 +98,11 @@ async fn api( .map_err(|e| bticino_easykit::Error::Other(e.to_string()))? } -pub fn run(out: Option, wait_minutes: u64, unlock_delay: u64) -> Result<()> { +pub fn run(out: Option, wait_minutes: u64, unlock_delay: u64, answers_dir: Option) -> Result<()> { + if let Some(d) = &answers_dir { + std::fs::create_dir_all(d)?; + } + let _ = ANSWERS.set(answers_dir); let dir = out.unwrap_or_else(|| format!("captures/session-{}", super::unix_now()).into()); std::fs::create_dir_all(&dir)?; // The blocking HTTP client must be created and dropped outside the From 258fdb3087db0a5ee2b763e5e4d80735609de52b Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:29:06 +0200 Subject: [PATCH 06/17] examples: dump module configs Co-Authored-By: Claude Opus 5.5 --- examples/configs.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 examples/configs.rs diff --git a/examples/configs.rs b/examples/configs.rs new file mode 100644 index 0000000..398ef9d --- /dev/null +++ b/examples/configs.rs @@ -0,0 +1,7 @@ +//! Prints /syncapi/v1/getconfigs for every module (read-only). +fn main() { + let mut c = bticino_easykit::Client::new().unwrap(); + let h = c.homes().unwrap().into_iter().find(|h| h.bridge().is_some()).unwrap(); + let ids: Vec<&str> = h.modules.iter().map(|m| m.id.as_str()).collect(); + println!("{:#}", c.configs(&h.id, &ids).unwrap()); +} From 30a71eea5430159f56cdc73b6ed00c468e25da19 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:38:07 +0200 Subject: [PATCH 07/17] docs: on-site results (both locks open, ring on WS, no FCM delivery to web token) Co-Authored-By: Claude Opus 5.5 --- docs/PROTOCOL.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index f339978..095f9f2 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -74,7 +74,9 @@ All are JSON `POST`s on `https://app.netatmo.net`. "modules":[{"id":"","bridge":"", "lock":false}]}} ``` -- Door release: `BNDL` + `{"lock": false}` (relocks by itself) **[others]** +- Door release: `BNDL` + `{"lock": false}` (relocks by itself) **[verified]** on both + locks of the maintainer's kit (pedestrian gate and `appliance_type: gate` garage), + 2026-10-21, seen opening on site - Staircase light: `BNSL` + `{"on": true|false}` **[others]** - Success: `{"status":"ok", …}`. @@ -94,7 +96,7 @@ Events arrive with `push_type = "-"`. On EASYKIT: | push_type | | |-----------|-| -| `BDIY-incoming_call` | doorbell rang; `snapshot_url`, `vignette_url`, `session_id` **[others]** | +| `BDIY-incoming_call` | doorbell rang **[verified]**, ~9 s after the press, on the `app_camera` WebSocket | | `BDIY-missed_call` / `BDIY-accepted_call` | **[others]** | | `BDIY-connection` / `BDIY-disconnection` | bridge online/offline **[unverified]** | | `BDIY-rtc` | **never received on EASYKIT** (bticino_intercom #72) | @@ -138,7 +140,14 @@ Firebase Installation and `fcmregistrations` web registration, all with `X-Android-Package`/`X-Android-Cert` (the API key is restricted to the app). A pure Android `register3` is rejected with `FIS_AUTH_ERROR`. -Delivery of call pushes to such a token: **[unverified]** until a ring. +Delivery of call pushes to such a (web) token: **not delivered [verified]** — on a +real ring neither `-incoming_call` nor `-rtc` reached it, while the WebSocket got +`BDIY-incoming_call`. Together with "Nothing to drop", the backend most likely +ignores non-Android tokens. A genuine Android FCM registration is needed. **[open]** + +A live-view offer sent **while the device is ringing** is rejected right after the +ack with `terminate` `{"code":1,"message":"Max number of peers reached"}` **[verified]**, +so the incoming call can only be joined by answering its `BDIY-rtc` offer. ## WebRTC live view on EASYKIT (observed 2026-10-21) From dd6587063f32e2d169566a3831c7e12bc8747932 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:41:47 +0200 Subject: [PATCH 08/17] addpushcontext: send the app versionCode, otherwise nothing is stored Co-Authored-By: Claude Opus 5.5 --- docs/PROTOCOL.md | 16 ++++++++-------- src/protocol.rs | 8 ++++++-- src/push.rs | 5 ++--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 095f9f2..a01a936 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -129,10 +129,11 @@ Registration (`u10.d.d` / `u10.d.k`), JSON POST: /api/droppushcontext {"credentials":"{\"device_token\":\"\"}","type":"Android"} ``` -`addpushcontext` answers `{"status":"ok"}` with either JSON or form bodies -**[verified]**, but `droppushcontext` then answers 406 -`{"error":{"code":7,"message":"Nothing to drop"}}` for every variant tried -(JSON/form, with/without `app_type`). **[open]** +`app_version` in `addpushcontext` is the app **versionCode** (`500000030` for +26.10.1.1, from `n40.a.b`), not the version name. With an old value such as +`4.1.1.3` the call still answers `{"status":"ok"}` but stores nothing: a later +`droppushcontext` answers 406 `{"error":{"code":7,"message":"Nothing to drop"}}`. +With `500000030` the drop answers `ok` **[verified]**. FCM registration that works **[verified]**: GCM check-in, `register3` as `org.chromium.linux` with a `wp:` subtype (retry on `PHONE_REGISTRATION_ERROR`), @@ -140,10 +141,9 @@ Firebase Installation and `fcmregistrations` web registration, all with `X-Android-Package`/`X-Android-Cert` (the API key is restricted to the app). A pure Android `register3` is rejected with `FIS_AUTH_ERROR`. -Delivery of call pushes to such a (web) token: **not delivered [verified]** — on a -real ring neither `-incoming_call` nor `-rtc` reached it, while the WebSocket got -`BDIY-incoming_call`. Together with "Nothing to drop", the backend most likely -ignores non-Android tokens. A genuine Android FCM registration is needed. **[open]** +Delivery of call pushes: on the 2026-10-21 ring nothing reached FCM, but that +registration used the old `app_version` and was never stored (see above). +Delivery to a web-style token with the correct versionCode: **[unverified]**. A live-view offer sent **while the device is ringing** is rejected right after the ack with `terminate` `{"code":1,"message":"Max number of peers reached"}` **[verified]**, diff --git a/src/protocol.rs b/src/protocol.rs index 280453f..5891049 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -29,6 +29,10 @@ pub const SCOPE: &str = "security_scopes"; pub const APP_VERSION: &str = "4.1.1.3"; pub const BUILD_NUMBER: &str = "4401103"; pub const APP_TYPE: &str = "app_camera"; +/// `versionCode` of Home + Security 26.10.1.1 (`n40.a.b`). `addpushcontext` +/// sends it as `app_version`; with an old value the call answers "ok" but +/// nothing is stored (a later `droppushcontext` says "Nothing to drop"). +pub const APP_VERSION_CODE: &str = "500000030"; /// User-Agent sent by the official app. pub fn user_agent() -> String { @@ -127,7 +131,7 @@ pub fn addpushcontext(fcm_token: &str, device_version: &str, os_version: &str) - "device_version": device_version, "os_version": os_version, "type": "Android", - "app_version": APP_VERSION, + "app_version": APP_VERSION_CODE, "app_type": APP_TYPE, }) } @@ -279,7 +283,7 @@ mod tests { fn addpushcontext_body() { assert_eq!( addpushcontext("tok", "Linux", "1").to_string(), - r#"{"app_type":"app_camera","app_version":"4.1.1.3","credentials":"{\"device_token\":\"tok\"}","device_version":"Linux","os_version":"1","type":"Android"}"# + r#"{"app_type":"app_camera","app_version":"500000030","credentials":"{\"device_token\":\"tok\"}","device_version":"Linux","os_version":"1","type":"Android"}"# ); } diff --git a/src/push.rs b/src/push.rs index d619723..e5c2cae 100644 --- a/src/push.rs +++ b/src/push.rs @@ -228,9 +228,8 @@ pub fn drop_push_context(api: &mut Client) -> Result> { else { return Ok(None); }; - // The cloud answers 406 `{"code":7,"message":"Nothing to drop"}` even - // right after a successful add, with JSON or form bodies alike; treat it - // as done and forget the local identity anyway. + // 406 `{"code":7,"message":"Nothing to drop"}` means nothing was stored + // (e.g. an add made by an older version); forget the identity anyway. let r = match api.post(p::DROPPUSHCONTEXT_PATH, &p::droppushcontext(&st.fcm_token)) { Err(Error::Api { status: 406, body }) => serde_json::from_str(&body).unwrap_or(Value::Null), other => other?, From 2b351101531324be66cf90dfef74ca85d3e2b498 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:42:29 +0200 Subject: [PATCH 09/17] push: set the FCM identity on a freshly registered client Co-Authored-By: Claude Opus 5.5 --- src/push.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/push.rs b/src/push.rs index e5c2cae..b004a15 100644 --- a/src/push.rs +++ b/src/push.rs @@ -114,6 +114,10 @@ pub fn load_or_register() -> Result<(FcmClient, FcmState, bool)> { } let (private_key, auth_secret) = c.create_new_keys().map_err(|e| Error::Other(format!("FCM: {e}")))?; let (fcm_token, android_id, security_token) = register_web(&private_key, &auth_secret).map_err(|e| Error::Other(format!("FCM registration: {e}")))?; + // The listener needs the identity on the client, not only on disk. + c.android_id = android_id; + c.security_token = security_token; + c.fcm_token = Some(fcm_token.clone()); let st = FcmState { android_id, security_token, fcm_token, private_key, auth_secret }; std::fs::create_dir_all(config_dir())?; let body = toml::to_string(&st).map_err(|e| Error::Other(e.to_string()))?; From 9662d4a30db901c9e711b295ef210b5c93a13dc1 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:53:54 +0200 Subject: [PATCH 10/17] GUI (egui): Home/Live/Calls/Settings, live H264 decoding, tray, autostart, single instance, EN/IT, screenshot+demo modes Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 4175 ++++++++++++++++++++++++-- Cargo.toml | 23 + assets/icons/bticino-easykit-128.png | Bin 0 -> 3220 bytes assets/icons/bticino-easykit-16.png | Bin 0 -> 461 bytes assets/icons/bticino-easykit-256.png | Bin 0 -> 6648 bytes assets/icons/bticino-easykit-32.png | Bin 0 -> 844 bytes assets/icons/bticino-easykit-48.png | Bin 0 -> 1253 bytes assets/icons/bticino-easykit-512.png | Bin 0 -> 15000 bytes assets/icons/bticino-easykit-64.png | Bin 0 -> 1534 bytes assets/icons/bticino-easykit.ico | Bin 0 -> 370070 bytes assets/icons/bticino-easykit.svg | 14 + src/actions.rs | 280 ++ src/bin/cli.rs | 8 +- src/bin/cli/session.rs | 4 +- src/bin/gui/app.rs | 641 ++++ src/bin/gui/autostart.rs | 43 + src/bin/gui/demo.rs | 50 + src/bin/gui/fonts.rs | 25 + src/bin/gui/main.rs | 136 + src/bin/gui/single.rs | 42 + src/bin/gui/tray.rs | 130 + src/call.rs | 49 +- src/i18n.rs | 118 + src/lib.rs | 4 + src/settings.rs | 60 + src/video.rs | 76 + 26 files changed, 5641 insertions(+), 237 deletions(-) create mode 100644 assets/icons/bticino-easykit-128.png create mode 100644 assets/icons/bticino-easykit-16.png create mode 100644 assets/icons/bticino-easykit-256.png create mode 100644 assets/icons/bticino-easykit-32.png create mode 100644 assets/icons/bticino-easykit-48.png create mode 100644 assets/icons/bticino-easykit-512.png create mode 100644 assets/icons/bticino-easykit-64.png create mode 100644 assets/icons/bticino-easykit.ico create mode 100644 assets/icons/bticino-easykit.svg create mode 100644 src/actions.rs create mode 100644 src/bin/gui/app.rs create mode 100644 src/bin/gui/autostart.rs create mode 100644 src/bin/gui/demo.rs create mode 100644 src/bin/gui/fonts.rs create mode 100644 src/bin/gui/main.rs create mode 100644 src/bin/gui/single.rs create mode 100644 src/bin/gui/tray.rs create mode 100644 src/i18n.rs create mode 100644 src/settings.rs create mode 100644 src/video.rs diff --git a/Cargo.lock b/Cargo.lock index 31b5db0..80e2cd8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,130 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad442f58ee04714aaa0ba0a2768c1ea1935b29507bb22ddece8cbbc76db02932" +dependencies = [ + "uuid", +] + +[[package]] +name = "accesskit_atspi_common" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c182f9c282ac9c5638d876d551d15e5f7d397ec263349a0c6a2b61595dd5e4" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "phf", + "serde", + "zvariant", +] + +[[package]] +name = "accesskit_consumer" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a45e2bb300bea6d5f33a82c3e051c3ddc6f41c209750f68a0acbe991a284344" +dependencies = [ + "accesskit", + "hashbrown 0.17.1", +] + +[[package]] +name = "accesskit_ios" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28e539d64b27fd4c14de8f78ada8f7c944c092f52f7e49fb63316507a57f6937" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.17.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", +] + +[[package]] +name = "accesskit_macos" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5701624bf6a11efb6d4c8e922bf44126ed96250e5faa9a7a0468c979635839a4" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.17.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "accesskit_unix" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202f24df034a7476d07b7f74284de84f6d62aabd858dbe7ee9cad3b7ad6f8f9d" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce63f35d6bdcf59f26b76b3379063f738e6412cef46999cc772d46aa3de35adb" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.17.1", + "static_assertions", + "windows 0.62.2", + "windows-core 0.62.2", +] + +[[package]] +name = "accesskit_winit" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee96dd150375c05912d8a473f98c2fb155fb3234fac88292d396548a2460fa77" +dependencies = [ + "accesskit", + "accesskit_ios", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + [[package]] name = "adler2" version = "2.0.1" @@ -43,6 +167,19 @@ dependencies = [ "subtle", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.5" @@ -52,6 +189,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "alsa" version = "0.9.1" @@ -74,6 +217,40 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "1.0.0" @@ -130,12 +307,63 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "arboard" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb9553e62312c8756a5979254fc6d7da8bbeb5986a1e17037fab932f7037917" +dependencies = [ + "clipboard-win", + "image", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.61.2", + "wl-clipboard-rs", + "x11rb", +] + +[[package]] +name = "arc-swap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e" +dependencies = [ + "rustversion", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading 0.8.9", +] + [[package]] name = "asn1-rs" version = "0.6.2" @@ -145,7 +373,7 @@ dependencies = [ "asn1-rs-derive 0.5.1", "asn1-rs-impl", "displaydoc", - "nom", + "nom 7.1.3", "num-traits", "rusticata-macros", "thiserror 1.0.69", @@ -161,7 +389,7 @@ dependencies = [ "asn1-rs-derive 0.6.0", "asn1-rs-impl", "displaydoc", - "nom", + "nom 7.1.3", "num-traits", "rusticata-macros", "thiserror 2.0.21", @@ -239,6 +467,102 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.5", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.5", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.5", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.92" @@ -250,12 +574,72 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atspi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d" +dependencies = [ + "atspi-common", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-proxies" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" +dependencies = [ + "atspi-common", + "serde", + "zbus", +] + [[package]] name = "autocfg" version = "1.5.1" @@ -292,6 +676,15 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec", +] + [[package]] name = "bit-vec" version = "0.9.1" @@ -331,6 +724,37 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bticino-easykit" version = "0.1.0" @@ -339,10 +763,16 @@ dependencies = [ "base64 0.22.1", "bytes", "clap", - "dirs", + "dirs 5.0.1", + "eframe", "env_logger", "fcm_receiver_rs", "futures-util", + "image", + "ksni", + "log", + "notify-rust", + "openh264", "reqwest 0.12.28", "rpassword", "rtc", @@ -352,7 +782,10 @@ dependencies = [ "tokio", "tokio-tungstenite", "toml", + "tray-icon", "webrtc", + "windows-sys 0.61.2", + "winreg 0.56.0", ] [[package]] @@ -389,6 +822,20 @@ name = "bytemuck" version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] [[package]] name = "byteorder" @@ -397,11 +844,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "bytes" -version = "1.12.1" +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.2", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" +dependencies = [ + "bitflags 2.13.2", + "polling", + "rustix 1.1.5", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.5", + "rustix 1.1.5", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" version = "1.9.0" @@ -409,6 +937,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877bf67ac8e52449eb2f9e98a344ea163beb70dd1f9eebe3cc5357dcfeaee4df" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -430,6 +960,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.5" @@ -442,6 +982,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + [[package]] name = "chacha20" version = "0.10.2" @@ -491,7 +1040,7 @@ version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn 3.0.9", @@ -503,6 +1052,35 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" +[[package]] +name = "clipboard-win" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" +dependencies = [ + "error-code", +] + +[[package]] +name = "codespan-reporting" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +dependencies = [ + "serde", + "termcolor", + "unicode-width", +] + +[[package]] +name = "color" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf" +dependencies = [ + "bytemuck", +] + [[package]] name = "colorchoice" version = "1.0.5" @@ -583,6 +1161,30 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "libc", +] + [[package]] name = "core_detect" version = "1.0.0" @@ -612,7 +1214,7 @@ dependencies = [ "alsa", "coreaudio-rs", "dasp_sample", - "jni", + "jni 0.21.1", "js-sys", "libc", "mach2", @@ -626,7 +1228,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows", + "windows 0.54.0", ] [[package]] @@ -680,12 +1282,36 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -727,6 +1353,12 @@ dependencies = [ "cipher", ] +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + [[package]] name = "dasp_sample" version = "0.11.0" @@ -789,7 +1421,7 @@ checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs 0.6.2", "displaydoc", - "nom", + "nom 7.1.3", "num-bigint", "num-traits", "rusticata-macros", @@ -803,7 +1435,7 @@ checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" dependencies = [ "asn1-rs 0.7.2", "displaydoc", - "nom", + "nom 7.1.3", "num-bigint", "num-traits", "rusticata-macros", @@ -844,7 +1476,16 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys", + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" +dependencies = [ + "dirs-sys 0.5.0", ] [[package]] @@ -855,10 +1496,28 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.4.6", "windows-sys 0.48.0", ] +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + [[package]] name = "dispatch2" version = "0.3.1" @@ -866,7 +1525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ "bitflags 2.13.2", - "objc2", + "objc2 0.6.5", ] [[package]] @@ -880,6 +1539,36 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading 0.8.9", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + [[package]] name = "ecdsa" version = "0.16.9" @@ -912,6 +1601,147 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "ecolor" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31bcbef0d4263a63eb32c4834e5d711613035ce1333468e107d928923e21e6e2" +dependencies = [ + "bytemuck", + "emath", +] + +[[package]] +name = "eframe" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c5642501a65ca657d05f00c643a5c14ff2346cb3818032bfe23d58e1f8e5f84" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "egui_system_font_provider", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "pollster", + "profiling", + "raw-window-handle", + "send_wrapper", + "static_assertions", + "wasm-bindgen", + "web-sys", + "web-time", + "wgpu", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9144f49b7a28b5f395d3147e325b4fe3e77ba686eac11d1bdf0a7da3f375f" +dependencies = [ + "accesskit", + "ahash", + "bitflags 2.13.2", + "emath", + "epaint", + "itertools 0.15.0", + "log", + "nohash-hasher", + "profiling", + "smallvec", + "unicode-segmentation", + "web-sys", +] + +[[package]] +name = "egui-wgpu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0309cbe1febed48af5b974e4bcc424b35e9664863a4d402697147b57a488c864" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "profiling", + "thiserror 2.0.21", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e449f4c4a2a60c7ccb4ba7fa4078417bfe1f9ddc03b5e05ce75748e33a70de" +dependencies = [ + "accesskit_winit", + "arboard", + "block2 0.6.2", + "bytemuck", + "egui", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", + "profiling", + "raw-window-handle", + "smithay-clipboard", + "web-time", + "webbrowser", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9275ca5cc35a6b7c94e0e8cedf22542f66cb0cf45ed8ab2657c78ff49fec7268" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "profiling", + "winit", +] + +[[package]] +name = "egui_system_font_provider" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2a2fdfe3c05dd9f691d2b1388b2312d6dce1af502f217c22136d22d9bd76f6" +dependencies = [ + "epaint", + "fontique", + "log", + "poll-promise", + "skrifa", + "sys-locale", + "unicode-script", +] + [[package]] name = "either" version = "1.19.0" @@ -939,6 +1769,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "emath" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73ce90f54750be8672c02be0743fe47530e6f251e066f0ee2869b59eb297af5" +dependencies = [ + "bytemuck", +] + [[package]] name = "encoding_rs" version = "0.8.42" @@ -953,6 +1792,33 @@ dependencies = [ "simdutf8", ] +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "env_filter" version = "2.0.0" @@ -976,6 +1842,38 @@ dependencies = [ "log", ] +[[package]] +name = "epaint" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97bac86ae3dde93fc3951e790951caea739ff39a6c89d909cdaf1d9278dbb1bd" +dependencies = [ + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "font-types", + "harfrust", + "log", + "nohash-hasher", + "parking_lot", + "profiling", + "self_cell", + "skrifa", + "smallvec", + "unicode-general-category", + "unicode-properties", + "unicode-segmentation", + "vello_cpu", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc1cc505827f4c23eedc297975a0fd038268d41293f389dd8ff3b574aefab19" + [[package]] name = "equivalent" version = "1.0.3" @@ -993,7 +1891,22 @@ dependencies = [ ] [[package]] -name = "event-listener" +name = "error-code" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" + +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + +[[package]] +name = "event-listener" version = "5.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" @@ -1024,6 +1937,12 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + [[package]] name = "fcm_receiver_rs" version = "0.1.1" @@ -1058,6 +1977,21 @@ dependencies = [ "url", ] +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "fearless_simd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" + [[package]] name = "ff" version = "0.13.1" @@ -1068,12 +2002,28 @@ dependencies = [ "subtle", ] +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + [[package]] name = "find-msvc-tools" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" version = "1.1.10" @@ -1081,7 +2031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.9.1", "zlib-rs", ] @@ -1091,13 +2041,77 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "fontique" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6688bc1294fe7117d788937b6c53480169b29c566954af490830d4c09da9516a" +dependencies = [ + "hashbrown 0.17.1", + "linebender_resource_handle", + "memmap2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-text", + "objc2-foundation 0.3.2", + "parlance", + "read-fonts", + "roxmltree", + "smallvec", + "windows 0.62.2", + "windows-core 0.62.2", + "yeslogic-fontconfig-sys", +] + [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", ] [[package]] @@ -1106,6 +2120,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1163,6 +2183,19 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.34" @@ -1203,6 +2236,64 @@ dependencies = [ "slab", ] +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + [[package]] name = "generic-array" version = "0.14.9" @@ -1214,6 +2305,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.5", + "windows-link", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -1227,6 +2328,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + [[package]] name = "getrandom" version = "0.4.3" @@ -1236,7 +2349,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 6.0.0", "rand_core 0.10.1", "wasm-bindgen", ] @@ -1252,137 +2365,467 @@ dependencies = [ ] [[package]] -name = "group" -version = "0.13.0" +name = "gio" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", ] [[package]] -name = "h2" -version = "0.3.27" +name = "gio-sys" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", ] [[package]] -name = "hashbrown" -version = "0.17.1" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] [[package]] -name = "heck" -version = "0.5.0" +name = "glib" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.2", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] [[package]] -name = "hex" -version = "0.4.3" +name = "glib-macros" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] -name = "hkdf" -version = "0.12.4" +name = "glib-sys" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ - "hmac", + "libc", + "system-deps", ] [[package]] -name = "hmac" -version = "0.12.1" +name = "glifo" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "282a26c1e23de04bdab3e34a21b6f877a479b96737792516b9b8b8f69b6661be" dependencies = [ - "digest 0.10.7", + "bytemuck", + "foldhash 0.2.0", + "hashbrown 0.17.1", + "log", + "peniko", + "png", + "skrifa", + "smallvec", + "vello_common", ] [[package]] -name = "http" -version = "0.2.12" +name = "glow" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" dependencies = [ - "bytes", - "fnv", - "itoa", + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "http" -version = "1.5.0" +name = "glutin" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" dependencies = [ - "bytes", - "itoa", + "bitflags 2.13.2", + "cfg_aliases", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading 0.8.9", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", ] [[package]] -name = "http-body" -version = "0.4.6" +name = "glutin-winit" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", ] [[package]] -name = "http-body" -version = "1.1.0" +name = "glutin_egl_sys" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" dependencies = [ - "bytes", - "http 1.5.0", + "gl_generator", + "windows-sys 0.52.0", ] [[package]] -name = "http-body-util" -version = "0.1.5" +name = "glutin_glx_sys" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" dependencies = [ - "bytes", - "futures-core", - "http 1.5.0", - "http-body 1.1.0", - "pin-project-lite", + "gl_generator", + "x11-dl", ] [[package]] -name = "httparse" -version = "1.10.1" +name = "glutin_wgl_sys" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] [[package]] -name = "httpdate" -version = "1.0.3" +name = "gobject-sys" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gpu-allocator" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +dependencies = [ + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.21", + "windows 0.62.2", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "guillotiere" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab" +dependencies = [ + "euclid", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "harfrust" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "read-fonts", + "smallvec", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "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.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http 1.5.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http 1.5.0", + "http-body 1.1.0", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hybrid-array" @@ -1593,6 +3036,22 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", + "tiff", + "zune-core", + "zune-jpeg", +] + [[package]] name = "indexmap" version = "2.14.2" @@ -1600,7 +3059,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", ] [[package]] @@ -1633,6 +3092,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1692,6 +3160,36 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + [[package]] name = "jni-sys" version = "0.3.1" @@ -1720,6 +3218,16 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + [[package]] name = "js-sys" version = "0.3.106" @@ -1732,26 +3240,145 @@ dependencies = [ ] [[package]] -name = "lazy_static" -version = "1.5.1" +name = "keyboard-types" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" +dependencies = [ + "bitflags 2.13.2", + "serde", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading 0.8.9", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "ksni" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bcc1cb43797140f74b711f1c4a49f48a7a7429f211c5fb78264e7bcd1e99caf" +dependencies = [ + "arc-swap", + "crossbeam-queue", + "futures-util", + "pastey", + "serde", + "tokio", + "zbus", +] + +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading 0.7.4", + "once_cell", +] + [[package]] name = "libc" version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "libredox" version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ + "bitflags 2.13.2", "libc", + "plain", + "redox_syscall 0.9.5", ] +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + +[[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.12.1" @@ -1764,6 +3391,12 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + [[package]] name = "lock_api" version = "0.4.14" @@ -1785,6 +3418,20 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" +[[package]] +name = "mac-notification-sys" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd604973958ddcc11b561193c0fb96ba146506ef2f231ef2e7c35fd2cbc9beca" +dependencies = [ + "cc", + "log", + "objc2 0.6.5", + "objc2-foundation 0.3.2", + "time", + "uuid", +] + [[package]] name = "mach2" version = "0.4.3" @@ -1810,6 +3457,15 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -1831,6 +3487,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + [[package]] name = "miniz_oxide" version = "0.9.1" @@ -1852,6 +3518,36 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4340e89c178916e62879c5c36b7f699019369be413e496178a6983ce91b8bc03" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "libc", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "png", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + [[package]] name = "multiversion_no_op" version = "1.0.0" @@ -1878,6 +3574,53 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.21", + "unicode-ident", +] + +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash 1.1.0", + "thiserror 2.0.21", +] + +[[package]] +name = "nasm-rs" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706bf8a5e8c8ddb99128c3291d31bd21f4bcde17f0f4c20ec678d85c74faa149" +dependencies = [ + "log", +] + [[package]] name = "native-tls" version = "0.2.18" @@ -1906,6 +3649,7 @@ dependencies = [ "log", "ndk-sys", "num_enum", + "raw-window-handle", "thiserror 1.0.69", ] @@ -1937,6 +3681,12 @@ dependencies = [ "memoffset", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "7.1.3" @@ -1947,6 +3697,29 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "notify-rust" +version = "4.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4587364a9a0074333429b3df75a30a205340c56a536ca3eb6ca0e59b87bbf8af" +dependencies = [ + "futures-lite", + "log", + "mac-notification-sys", + "serde", + "tauri-winrt-notification", + "zbus", +] + [[package]] name = "num-bigint" version = "0.4.8" @@ -2001,6 +3774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -2019,7 +3793,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", "syn 2.0.119", @@ -2034,6 +3808,22 @@ dependencies = [ "libc", ] +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + [[package]] name = "objc2" version = "0.6.5" @@ -2043,6 +3833,36 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-audio-toolbox" version = "0.3.2" @@ -2051,11 +3871,35 @@ checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08" dependencies = [ "bitflags 2.13.2", "libc", - "objc2", + "objc2 0.6.5", "objc2-core-audio", "objc2-core-audio-types", "objc2-core-foundation", - "objc2-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", ] [[package]] @@ -2065,7 +3909,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" dependencies = [ "dispatch2", - "objc2", + "objc2 0.6.5", "objc2-core-audio-types", "objc2-core-foundation", ] @@ -2077,7 +3921,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" dependencies = [ "bitflags 2.13.2", - "objc2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", ] [[package]] @@ -2088,60 +3944,286 @@ checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.2", "dispatch2", - "objc2", + "objc2 0.6.5", ] [[package]] -name = "objc2-encode" -version = "4.1.0" +name = "objc2-core-graphics" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] [[package]] -name = "objc2-foundation" -version = "0.3.2" +name = "objc2-core-image" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "objc2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", ] [[package]] -name = "oid-registry" -version = "0.7.1" +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "asn1-rs 0.6.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", ] [[package]] -name = "oid-registry" -version = "0.8.1" +name = "objc2-core-text" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" dependencies = [ - "asn1-rs 0.7.2", + "bitflags 2.13.2", + "objc2-core-foundation", ] [[package]] -name = "once_cell" -version = "1.21.4" +name = "objc2-encode" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] -name = "once_cell_polyfill" -version = "1.70.2" +name = "objc2-foundation" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] [[package]] -name = "opaque-debug" +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "libc", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "oid-registry" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs 0.6.2", +] + +[[package]] +name = "oid-registry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +dependencies = [ + "asn1-rs 0.7.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "opaque-debug" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openh264" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54411f498088327bf5c45d2de7e5b0ed25875ee3be5800485afe45da7206bff" +dependencies = [ + "openh264-sys2", + "wide", +] + +[[package]] +name = "openh264-sys2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414f5bd53da84e126dc9449eb6f0003bb6994b2de63c48119b0c9b7a8b28086a" +dependencies = [ + "cc", + "nasm-rs", + "walkdir", +] + [[package]] name = "openssl" version = "0.10.81" @@ -2150,7 +4232,7 @@ checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ "bitflags 2.13.2", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "openssl-macros", "openssl-sys", @@ -2191,6 +4273,54 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "os_pipe" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + [[package]] name = "p256" version = "0.13.2" @@ -2203,6 +4333,31 @@ dependencies = [ "sha2", ] +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "parking" version = "2.2.1" @@ -2227,11 +4382,23 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.18", "smallvec", "windows-link", ] +[[package]] +name = "parlance" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73072a9470554c8e794778acece2312661218aaabb635600957d952cf01c716e" + +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + [[package]] name = "pem" version = "3.0.6" @@ -2261,6 +4428,19 @@ dependencies = [ "base64ct", ] +[[package]] +name = "peniko" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6" +dependencies = [ + "bytemuck", + "color", + "kurbo", + "linebender_resource_handle", + "smallvec", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -2268,87 +4448,256 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] -name = "pin-project-lite" -version = "0.2.17" +name = "petgraph" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", +] [[package]] -name = "pkcs8" -version = "0.10.2" +name = "phf" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" dependencies = [ - "der", - "spki", + "phf_macros", + "phf_shared", + "serde", ] [[package]] -name = "pkg-config" -version = "0.3.34" +name = "phf_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" +dependencies = [ + "fastrand", + "phf_shared", +] [[package]] -name = "polyval" -version = "0.6.2" +name = "phf_macros" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash", + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] -name = "portable-atomic" -version = "1.15.0" +name = "phf_shared" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] [[package]] -name = "portable-atomic-util" -version = "0.2.8" +name = "pin-project" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ - "portable-atomic", + "pin-project-internal", ] [[package]] -name = "potential_utf" -version = "0.1.6" +name = "pin-project-internal" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ - "zerovec", + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] -name = "powerfmt" -version = "0.2.1" +name = "pin-project-lite" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] -name = "ppv-lite86" -version = "0.2.21" +name = "piper" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" dependencies = [ - "zerocopy", + "atomic-waker", + "fastrand", + "futures-io", ] [[package]] -name = "primeorder" -version = "0.13.6" +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "poll-promise" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6a58fecbf9da8965bcdb20ce4fd29788d1acee68ddbb64f0ba1b81bccdb7df" +dependencies = [ + "document-features", + "static_assertions", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6355899e1c9462875b6757c79f3caa011a1fdae12bbb1a2e72dd1f234f8336" + +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "primeorder" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ "elliptic-curve", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -2358,6 +4707,30 @@ dependencies = [ "toml_edit 0.25.17+spec-1.1.0", ] +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" version = "1.0.107" @@ -2367,6 +4740,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + [[package]] name = "prost" version = "0.12.6" @@ -2384,7 +4763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.119", @@ -2419,6 +4798,27 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + [[package]] name = "quinn" version = "0.11.12" @@ -2430,7 +4830,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp 0.5.16", - "rustc-hash", + "rustc-hash 2.1.3", "rustls", "socket2 0.6.5", "thiserror 2.0.21", @@ -2451,7 +4851,7 @@ dependencies = [ "rand 0.10.3", "rand_pcg", "ring", - "rustc-hash", + "rustc-hash 2.1.3", "rustls", "rustls-pki-types", "slab", @@ -2497,6 +4897,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r-efi" version = "6.0.0" @@ -2568,6 +4974,30 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + [[package]] name = "rcgen" version = "0.14.10" @@ -2582,6 +5012,26 @@ dependencies = [ "yasna", ] +[[package]] +name = "read-fonts" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + +[[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 = "redox_syscall" version = "0.5.18" @@ -2591,6 +5041,15 @@ dependencies = [ "bitflags 2.13.2", ] +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags 2.13.2", +] + [[package]] name = "redox_users" version = "0.4.6" @@ -2602,6 +5061,16 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.21", +] + [[package]] name = "regex" version = "1.13.1" @@ -2640,6 +5109,12 @@ dependencies = [ "bytecheck", ] +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + [[package]] name = "reqwest" version = "0.11.27" @@ -2679,7 +5154,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "winreg 0.50.0", ] [[package]] @@ -2754,7 +5229,7 @@ checksum = "d9776093b7ca170454ab1406954f7b7d97a57c51dc6c0642957fb2ef25c2d399" dependencies = [ "bytecheck", "bytes", - "hashbrown", + "hashbrown 0.17.1", "indexmap", "munge", "ptr_meta", @@ -2788,6 +5263,15 @@ dependencies = [ "symphonia", ] +[[package]] +name = "roxmltree" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb" +dependencies = [ + "memchr", +] + [[package]] name = "rpassword" version = "7.5.4" @@ -2981,7 +5465,7 @@ dependencies = [ "log", "rand 0.10.3", "rtc-shared", - "rustc-hash", + "rustc-hash 2.1.3", "slab", "thiserror 2.0.21", ] @@ -3069,6 +5553,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.3" @@ -3090,7 +5580,20 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "nom", + "nom 7.1.3", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] @@ -3102,7 +5605,7 @@ dependencies = [ "bitflags 2.13.2", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.12.1", "windows-sys 0.61.2", ] @@ -3174,6 +5677,15 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "safe_arch" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42c6efa15875e6ecb39ca61fb0b0c1a40b84fac5a5ffe71eef7d1000c8eb3f5f" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -3198,12 +5710,31 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit 0.19.2", + "tiny-skia", +] + [[package]] name = "sec1" version = "0.7.3" @@ -3241,6 +5772,12 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813" + [[package]] name = "semver" version = "1.0.28" @@ -3248,8 +5785,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] -name = "serde" -version = "1.0.229" +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ @@ -3290,6 +5833,17 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "serde_spanned" version = "0.6.9" @@ -3350,6 +5904,16 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + [[package]] name = "signature" version = "2.2.0" @@ -3366,6 +5930,16 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + [[package]] name = "simdutf8" version = "0.1.5" @@ -3383,18 +5957,115 @@ dependencies = [ "time", ] +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "skrifa" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.14.5", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.5", + "thiserror 2.0.21", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + [[package]] name = "socket2" version = "0.5.10" @@ -3415,6 +6086,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "spirv" +version = "0.4.0+sdk-1.4.341.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +dependencies = [ + "bitflags 2.13.2", +] + [[package]] name = "spki" version = "0.7.3" @@ -3431,6 +6111,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + [[package]] name = "strsim" version = "0.11.1" @@ -3599,6 +6291,16 @@ dependencies = [ "symphonia-metadata", ] +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.119" @@ -3658,6 +6360,15 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "libc", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -3679,6 +6390,36 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri-winrt-notification" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f37a6c354fd28fc9e322ed9bd47e3959576dad28c9d58ea1cf888cce1c7ccb36" +dependencies = [ + "thiserror 2.0.21", + "windows 0.62.2", + "windows-version", +] + [[package]] name = "tempfile" version = "3.27.0" @@ -3688,7 +6429,7 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix", + "rustix 1.1.5", "windows-sys 0.61.2", ] @@ -3741,6 +6482,20 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + [[package]] name = "time" version = "0.3.55" @@ -3773,6 +6528,31 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinystr" version = "0.8.4" @@ -3799,8 +6579,10 @@ dependencies = [ "libc", "mio", "pin-project-lite", + "signal-hook-registry", "socket2 0.6.5", "tokio-macros", + "tracing", "windows-sys 0.61.2", ] @@ -3867,21 +6649,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.11", - "toml_edit 0.22.27", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", ] [[package]] name = "toml_datetime" -version = "0.6.11" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -3897,16 +6679,26 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.27" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime 0.6.11", - "toml_write", - "winnow 0.7.15", + "toml_datetime 0.6.3", + "winnow 0.5.40", ] [[package]] @@ -3930,12 +6722,6 @@ dependencies = [ "winnow 1.0.4", ] -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - [[package]] name = "tower" version = "0.5.3" @@ -3987,10 +6773,23 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ + "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "tracing-core" version = "0.1.36" @@ -4000,12 +6799,50 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tray-icon" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5cc5858ecf9574ddd8f0032a2ff7ffd6f7724d2b81e48b9374984b3fd6ddc9" +dependencies = [ + "crossbeam-channel", + "dirs 7.0.0", + "libappindicator", + "muda", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "once_cell", + "png", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "tree_magic_mini" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" +dependencies = [ + "memchr", + "nom 8.0.0", + "petgraph", +] + [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + [[package]] name = "tungstenite" version = "0.30.0" @@ -4024,24 +6861,74 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash 2.1.3", +] + [[package]] name = "typenum" version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + [[package]] name = "unicase" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-script" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "universal-hash" version = "0.5.1" @@ -4090,6 +6977,7 @@ checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" dependencies = [ "getrandom 0.4.3", "js-sys", + "serde_core", "wasm-bindgen", ] @@ -4099,6 +6987,41 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vello_common" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb2141a2bca6e6d598e471fd4d1d7eed8e020aad6a28187edda07f091a325dd" +dependencies = [ + "bytemuck", + "fearless_simd", + "guillotiere", + "log", + "peniko", + "png", + "smallvec", + "thiserror 2.0.21", +] + +[[package]] +name = "vello_cpu" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace506ca414548966fcf3c283be94eb1cad8254de488791ee698bf438b0890a9" +dependencies = [ + "bytemuck", + "glifo", + "hashbrown 0.17.1", + "png", + "vello_common", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + [[package]] name = "version_check" version = "0.9.5" @@ -4130,6 +7053,15 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" version = "0.2.129" @@ -4186,6 +7118,141 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.5", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.5", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.5", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.106" @@ -4206,6 +7273,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webbrowser" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c35be770821a214dbc362fc26908c853e776c0004294d0b10b8a6bad582f94" +dependencies = [ + "jni 0.22.4", + "log", + "ndk-context", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + [[package]] name = "webpki-roots" version = "1.0.10" @@ -4234,69 +7317,363 @@ dependencies = [ ] [[package]] -name = "winapi" -version = "0.3.9" +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "wgpu" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" +dependencies = [ + "arrayvec", + "bitflags 2.13.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "js-sys", + "log", + "naga", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.2", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "indexmap", + "log", + "naga", + "naga-types", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.21", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-wasm", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-naga-bridge", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-wasm" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d260ca2ca8adc654f513a869bf3cac0b47f5b8d3f87803d6942015f8de597aae" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "glow", + "glutin_wgl_sys", + "gpu-allocator", + "hashbrown 0.17.1", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.8.9", + "log", + "naga", + "naga-types", + "ndk-sys", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "once_cell", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "raw-window-metal", + "renderdoc-sys", + "smallvec", + "static_assertions", + "thiserror 2.0.21", + "wasm-bindgen", + "wayland-sys", + "web-sys", + "wgpu-naga-bridge", + "wgpu-types", + "windows 0.62.2", + "windows-core 0.62.2", + "windows-result 0.4.1", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "js-sys", + "log", + "naga-types", + "raw-window-handle", + "static_assertions", + "web-sys", +] + +[[package]] +name = "wide" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d920ac99c3c8edce110cb8d07dbb324d6d026011dce85b1e9355b70f0adacc4f" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[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" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core 0.54.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core 0.62.2", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result 0.1.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result 0.4.1", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-core 0.62.2", + "windows-link", + "windows-threading", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-implement" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] -name = "winapi-util" -version = "0.1.11" +name = "windows-interface" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ - "windows-sys 0.61.2", + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "windows" -version = "0.54.0" +name = "windows-numerics" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core", - "windows-targets 0.52.6", + "windows-core 0.62.2", + "windows-link", ] [[package]] -name = "windows-core" -version = "0.54.0" +name = "windows-result" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-result", "windows-targets 0.52.6", ] [[package]] -name = "windows-link" -version = "0.2.1" +name = "windows-result" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] [[package]] -name = "windows-result" -version = "0.1.2" +name = "windows-strings" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -4326,6 +7703,15 @@ 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.61.2" @@ -4381,6 +7767,24 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4513,11 +7917,63 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases", + "concurrent-queue", + "core-foundation 0.9.4", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit 0.19.2", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winnow" -version = "0.7.15" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -4541,12 +7997,78 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wl-clipboard-rs" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d7888ccd4896447b2d14d3a9350a85df2aeb6f181e2e7a31349d104ac46cac1" +dependencies = [ + "libc", + "log", + "os_pipe", + "rustix 1.1.5", + "thiserror 2.0.21", + "tree_magic_mini", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-wlr", +] + [[package]] name = "writeable" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.9", + "once_cell", + "rustix 1.1.5", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + [[package]] name = "x509-parser" version = "0.16.0" @@ -4557,7 +8079,7 @@ dependencies = [ "data-encoding", "der-parser 9.0.0", "lazy_static", - "nom", + "nom 7.1.3", "oid-registry 0.7.1", "rusticata-macros", "thiserror 1.0.69", @@ -4574,7 +8096,7 @@ dependencies = [ "data-encoding", "der-parser 10.0.0", "lazy_static", - "nom", + "nom 7.1.3", "oid-registry 0.8.1", "ring", "rusticata-macros", @@ -4582,6 +8104,37 @@ dependencies = [ "time", ] +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + [[package]] name = "yasna" version = "0.6.0" @@ -4592,6 +8145,17 @@ dependencies = [ "time", ] +[[package]] +name = "yeslogic-fontconfig-sys" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76" +dependencies = [ + "dlib", + "once_cell", + "pkg-config", +] + [[package]] name = "yoke" version = "0.8.3" @@ -4615,6 +8179,113 @@ dependencies = [ "synstructure 0.14.0", ] +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix 1.1.5", + "serde", + "serde_repr", + "tokio", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.4", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus-lockstep" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 3.0.9", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +dependencies = [ + "serde", + "winnow 1.0.4", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "5.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" +dependencies = [ + "serde", + "winnow 1.0.4", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zcheapstr" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473" +dependencies = [ + "serde", +] + [[package]] name = "zerocopy" version = "0.8.63" @@ -4706,3 +8377,59 @@ name = "zmij" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zune-core" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 1.0.4", + "zcheapstr", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 3.0.9", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.9", + "winnow 1.0.4", +] diff --git a/Cargo.toml b/Cargo.toml index 42a0040..118b05b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,15 +18,25 @@ path = "src/lib.rs" name = "bticino-easykit" path = "src/bin/cli.rs" +[[bin]] +name = "bticino-easykit-gui" +path = "src/bin/gui/main.rs" +required-features = ["gui"] + [dependencies] async-trait = "0.1" base64 = "0.22" bytes = "1" clap = { version = "4", features = ["derive"] } dirs = "5" +eframe = { version = "0.37", optional = true } env_logger = "0.11" fcm_receiver_rs = "0.1.1" futures-util = "0.3" +image = { version = "0.25", default-features = false, features = ["png", "jpeg"], optional = true } +log = "0.4" +notify-rust = { version = "4", optional = true } +openh264 = { version = "0.9", optional = true } reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] } rpassword = "7" rtc = { version = "0.21.1", default-features = false } @@ -37,3 +47,16 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time" tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } toml = "0.8" webrtc = "0.21" + +[features] +default = ["gui"] +# Desktop app (egui) and H264 decoding; `--no-default-features` builds the CLI only. +gui = ["dep:openh264", "dep:eframe", "dep:image", "dep:notify-rust", "dep:ksni", "dep:tray-icon", "dep:windows-sys", "dep:winreg"] + +[target.'cfg(target_os = "linux")'.dependencies] +ksni = { version = "0.3", default-features = false, features = ["tokio"], optional = true } + +[target."cfg(windows)".dependencies] +tray-icon = { version = "0.26", optional = true } +windows-sys = { version = "0.61", features = ["Win32_UI_WindowsAndMessaging", "Win32_Foundation"], optional = true } +winreg = { version = "0.56", optional = true } diff --git a/assets/icons/bticino-easykit-128.png b/assets/icons/bticino-easykit-128.png new file mode 100644 index 0000000000000000000000000000000000000000..0724c077a97cc9e088d392fc57faebe37a13e710 GIT binary patch literal 3220 zcmV;F3~Td=P)B|7UlTkOv7N56A;T5R#Y_5CSSDNT5I~1Q-xY z1f|$2DD7ym&>}k3POZ_w0**5jd{u=>cv(iEA|M1LM8vEHD3C-6BqZcT0?Fo`?7f|H zdDvt(WS_^}bI)&PXO?^KIXBDqzu)=3^PSxT2m}IwKp+qZ1OkCTAkYeg#Z87xUpY|r z@R&>_`94X9I3i;xfFJ;V06d^=+5t2GsF4YZbQ1Cb`2@`7tV^G*sZgx|BIdjhq?fRe z$aoyUSa;orX9)0(B$Lf%gPc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fDyCP^~6p8#=y91WR-fWVJ_Ya808O<8$OUFkwRg0000cf14VG5R!Ha!uIWPQn#~6P1jQtSZ6#WiP&F@!|!wdsCv_C*g8BxsjP)4 zr5iO}XW>m7TPdZ>M&jJ`2*zSEUaJQ9)+l>?^MMDV-8F9anoywE@hL7(3XE7+|BkE{deN{2EGGEx_~d~>F^q^e%z4x&^WD&zcrgvwY_suX{OsxmGvhHxq6cw#foGN~@2IF% zt{I>dY14px3^v=8(gd6J)!ie@mW|KkaSA)FlKzY@^@@44pJ(P-00000NkvXXu0mjf DXe7}= literal 0 HcmV?d00001 diff --git a/assets/icons/bticino-easykit-256.png b/assets/icons/bticino-easykit-256.png new file mode 100644 index 0000000000000000000000000000000000000000..abf860a24c5a212dc065d36b1abcdaf5dd8ef5f6 GIT binary patch literal 6648 zcma)hWmHsA+x8hsT0+7h1r!h@R2U?Okd%;=P5~LZB?P1!q@+ViS{jB%kdTg{ySs;; zZ+zCb-hc12-hF=TbJpJHUe~?jj_VFpQIa9T2jc?(KqMzCr3wHb^eYI!#X)y^j)msv z4#z}6MhZavd$O7f;sD@rshpI!x_jFGJf6GyMD~LtR5E8A2_pdv`Yi_6SWVlk*qZ4B z2ru;!qOoR5({Msl7rF>*#I-ElSIg8%nrT#fPEzRW`<3(S9+LuD&r4%G#()66-85u6 zsjk)6zbtVLn;ADKZ$nXudZ$CVj=P}-3+#~p-ee&dLGtOh{ZmDbBiguHjWJtHSb_@f zLbxH+c)x*=KUzN0I{KQG>Q8-N0ZO<_5dp%?OEcV09rK{I@e64oY{{u&$ljOaKFZx# z(Bj@?#UC8~59*h|Px5F%SyVvM#5$Ad8bJt!fxA`~4o8^icW(@w3Kt+ZVkqL&qrY|Y zYrQ_kB8bG?CAo*xisiQ;v}N6~VUv=phci%dnj3ieO21c^Lk6$sP=OH>8b9%tNrr=} zO@jRhqRfp{H8b}xX1>7l{rgU9w6=&>!s8X_thP}=%4OO{)i)R5zTDS7}!flCOm2dF;>N@l_qSpp|uGwD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@lngD2G&wfX&FhwX! zG-r-)+oO?t%6v?SPl%nq2!w_J&;?vnVCZQ!Lb(8S3uw6EJM<5E|2b!#PG-cWVD z^Xw@pH||p*6h5lHZfCp8l}XX`ggupg-*Aa#-AyKKiyV~c5qM@4_KCP5xmEx zi{*NgZ`r>0qC!QM2DF>=1z7HI;bRp0N9txX`YOg4W0tmDQM{1;k=CQ_RLSY^o95WI z9K69N6`X?io;gNhrQtgp@`dLnN;=%TzZyOwX!dT%9^?Zu8X~$1*0$$IQi51FZ;c6ITSW>L$Bw{UC?@3olM`5#_$$?%eWMD!J zXh}@omY>n&la{r6=DVOt6&`2Zyg=>6`GH{zJOE0vFgZH`M(rSI# zvY0?B%2mncZK3PlF=tA{IP$L@vn!#mkKDfkLy99p5wHzzV?_x=72;sps2c)oW3xUs6L z5Lq|8>BnUHSZ0j@O@t(hpx1#?v{>Vtv6@K}|wLgRl^w6aoK<=%QRGEa)*Z&7tb+ljr literal 0 HcmV?d00001 diff --git a/assets/icons/bticino-easykit-32.png b/assets/icons/bticino-easykit-32.png new file mode 100644 index 0000000000000000000000000000000000000000..767dfd608cb70dfee44c2c39f020e5af7990d518 GIT binary patch literal 844 zcmV-S1GD^zP)&Q576BJFBmo0e?mqDBeIYIf0!p#6S!I13Rag1R-1_%wXNtInFyA?LW_a|4318LQFGAmH$$Ii2CZT- zIOaLnA%RvxGU&B%IqVpH+a$H!&UqO0IzmHVk9mw5Q-z^iVLrS_!teeiSjFriwXV9O@~T|;W=#9M9aovc`p10jOi&-*(lITi8hxV z?UV1MdQoyNGz=Fx12&f(RnM=0Q?XLJez*nq4_#Jdf>L6jZK7KeKW!+*8N*Sqj0$Z_ z*@#F62qBoU&*E11V^1GNlwGQnSKSsYsZiW=IvPJ5HmUG52a_&46x}(W3yg8Orh5|LJem0Q$m^Oa{m!f5RJI{t@zqC}>VCkc!;lYk1|$ z@j{(X22^gV#l`TI;;VJ_XiH-!zJ8xWfiVpn8~9mnpLe38cLYy6KlmHc&#PHW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 diff --git a/assets/icons/bticino-easykit-64.png b/assets/icons/bticino-easykit-64.png new file mode 100644 index 0000000000000000000000000000000000000000..4a5cb05c36d7139c1709ce42760e23c50b7ce411 GIT binary patch literal 1534 zcmVAxJYR0kdTZ!oAY8 zmd@79|5~=SXxi3hi)^;#%Ks{>Ek;(rg~JO{*u=PM4!E4Rz3=5Z zzzg@DBj>`s+|PD)?|sknybtelp7T8Kd3g^IAV7fG3{fH+m-lv*9ij<@<`U2tfJ6eA zhw0@uK)WeOCjqUNh*;54QPef14v5_JPJ|@TcPZ#j03v2KG65-rAQyHX{jl@C9T1bZ z$4m*n0WcrF#Z4L5-c`B3axx)tvXfEydv}B2O8`3f9y$WN5Sp0zZ@;DP7sU|}&HO;^Pfyx%?OZy*$omBoy;$vsMQcau)Ub6(Cb>yCBSKT>yh9P;)-AK4JBIB11 z@C4;^93OH(a-4yG-s!*2!`{i&mImJDtO(vj@}@CX>R7gCuzS9%xt@P_4xY>8WcY6c zWTzW>sdK^xK6>!G%vs1xi}&9MV6Zx$8Xw8C{iP1a!`X^u5&X(~d+^iZ07h22(W|A- zr>cOr5irXUFw2p&HgKk?9fhC#pm-UJEw8cFA5WhUXRHIl^&wcjJQhRtVMTgDlE`(n zM$+1VF**!~-g*f$6-jFYeYV@Esl5ohtS|yZ5jks9p%0no<2m5G1s|83P^CM6?gKEd zONUQ8AU`V&v4%w$7#vchr<)VRXN+1SX>EZ0k08ys1Tz&$YXgBYs1KAu%;YjCV3s3b zmLp)6BTa|Vx}GMKT27*^&#^w3xG)A=jT`WUAxh&zPwy+z$~gHJfXa^njBG{ z>#WYRQa2GhlJl@8JQW(!>nJwih?fJifL67$CusY959n1F4iBOV0hF^J42Y>s{ z08~Nw*xWgQ)&S%=rG2+w>GgQwgVp)_sr43XuPQx4Q0?{>kch}qva%IS0OdcPgSRL@ z-Ka**J|qoSxphE?<7I=dmG;h7e%b1e*07CM$LpIF>rslsSIZA{k8c-U2``AxJ|_^m zOUX8Q3gGl_ZI~CVLsF~(fe=EaAg2_139GXagxa(m_{+@gRC}wvCd;4fDQyJeIOcS5EMfqW^2X%^X`O+lAigSBy7t$m2&|S%U&p(0WVXr#MbSY kkX-31+Xn~`AOKwOKLn=F{Z}etI{*Lx07*qoM6N<$f+8d5fdBvi literal 0 HcmV?d00001 diff --git a/assets/icons/bticino-easykit.ico b/assets/icons/bticino-easykit.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11691fd7f903e293d529afe871e4031e6fd64a7 GIT binary patch literal 370070 zcmeHw378edwg2TM(f{}T|9Q!Kd3kv+>fEbh)c9gdH0C90^d)Mda_@l2xGw||HSVG^ zGay`15n0^z34*vF42!s+xS%q!3bKo=B7=g!u&;^&^{>-2bt!tfZ*^67)$Oi(=KFf8 zy8G0rbAIRis{3|Vcc)UVQU|4e_`?(}GpTF8n@V*`rBazp(|R4@Do#nI^7-cV|I;dU_FYr~{R4f+WWJla>AqH}W9T|nMYl9gyZDpo+O)kBfE<~`b23cssY-w)mwCjD+PG!&aLao;17B@3)Ep7>?^d-rB`w73)|m%u9qXbc;z&bAA5zfEcyIH zXB+I}+LL1Kq0b=`?l23{$<*)UN)C}Hh;3SKwY-|f!gl2KRmD&PrVVud(jKb&uM+IU*D7yWaNW4lerUKA`7RzS#$xJ z5&dr>(8kA)IbJx_W-D&=ktc5rX&U?8<5sctH=nuJuYUruaAQ!Dt(flD|AsG?7RDOZ z=cY|xkay-i?<`Pf+gZ7O<>F%fPixVCkz8XsS-EM`=j4{UzmQ7@AMY%;)}2GVZ1D4k zZr|$BzpuTlUsk?7?>TbK(9;fB#?ODD1qMa>FC3$p9mQl>zpQ*~?z5!Jn0DlYrLT~Q zOJ5~-zSNe0O>93ai|J(jva*;g)5l7{|K_?sJ2rqF5DQ8CL-`MOfDPa?EM9$sOfjFB z->fVq%lwuti|J(jva*;g-|y0y?~y65KJB@{xhOANOegD?mBnOvopbBQkavgm_gv>WV`8Smr_24Z<&%dEB<~Lt9|Nii_!OJd%ZN9%hm>mudO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7^~5Vgr|&lpYvqf;{|8m@`bGc% literal 0 HcmV?d00001 diff --git a/assets/icons/bticino-easykit.svg b/assets/icons/bticino-easykit.svg new file mode 100644 index 0000000..e63b2c4 --- /dev/null +++ b/assets/icons/bticino-easykit.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/actions.rs b/src/actions.rs new file mode 100644 index 0000000..fc1e999 --- /dev/null +++ b/src/actions.rs @@ -0,0 +1,280 @@ +//! Actions shared by the CLI and the GUI, plus a background [`Worker`] +//! that runs them off the UI thread and reports back through a channel. + +use std::sync::mpsc::{channel, Receiver, Sender}; +use std::sync::Arc; +use std::time::Duration; + +use serde_json::Value; +use tokio::sync::Notify; + +use crate::call::{self, CallOptions, CallReport, Mode}; +use crate::model::{Home, ModuleKind}; +use crate::push::{self, Push}; +use crate::{protocol as p, Client, Error, Result}; + +/// The first home that has an intercom bridge. +pub fn default_home(c: &mut Client) -> Result { + c.homes()? + .into_iter() + .find(|h| h.bridge().is_some()) + .ok_or_else(|| Error::Other("no BTicino intercom found on this account".into())) +} + +/// Opens a door lock (`BNDL`); the device relocks by itself. +pub fn unlock(c: &mut Client, home: &Home, module_id: &str) -> Result { + match home.module(module_id).map(|m| m.kind) { + Some(ModuleKind::DoorLock) => c.set_state(home, module_id, p::unlock_state()), + _ => Err(Error::Other(format!("{module_id} is not a door lock"))), + } +} + +/// Switches a staircase light (`BNSL`). +pub fn light(c: &mut Client, home: &Home, module_id: &str, on: bool) -> Result { + c.set_state(home, module_id, p::light_state(on)) +} + +/// Live view parameters for the home's external unit. +pub fn live_mode(home: &Home) -> Result { + let device_id = home.bridge().ok_or_else(|| Error::Other("no bridge".into()))?.id.clone(); + let module_id = home.by_kind(ModuleKind::ExternalUnit).next().map(|m| m.id.clone()); + Ok(Mode::Live { device_id, module_id }) +} + +/// Staircase lights, including the ones hidden in the app (`visible: false` +/// in `getconfigs`), which `homesdata` leaves out. +pub fn staircase_lights(c: &mut Client, home: &Home) -> Result> { + let ids: Vec<&str> = home.modules.iter().map(|m| m.id.as_str()).collect(); + let v = c.configs(&home.id, &ids)?; + Ok(v["body"]["home"]["modules"] + .as_array() + .map(|a| { + a.iter() + .filter(|m| m["type"] == "BNSL") + .filter_map(|m| Some((m["id"].as_str()?.to_owned(), m["name"].as_str().unwrap_or("").to_owned()))) + .collect() + }) + .unwrap_or_default()) +} + +pub enum Command { + Login { email: String, password: String }, + Logout, + Refresh, + Unlock(String), + Light(String, bool), + StartLive, + StopLive, +} + +pub enum Update { + LoggedIn(bool), + Home(Box, Value), + Lights(Vec<(String, String)>), + Events(Value), + Info(String), + Error(String), + LiveState(String), + #[cfg(feature = "gui")] + Frame(crate::video::RgbaFrame), + LiveEnded(std::result::Result), + Ring(Push), +} + +/// Owns the API client on its own thread; never blocks the caller. +pub struct Worker { + tx: Sender, + pub rx: Receiver, +} + +impl Worker { + /// `wake` is called after every update (e.g. to request a repaint). + pub fn spawn(wake: impl Fn() + Send + Sync + 'static) -> Self { + let (tx, crx) = channel::(); + let (utx, rx) = channel::(); + let wake: Arc = Arc::new(wake); + std::thread::Builder::new() + .name("easykit-worker".into()) + .spawn(move || run(crx, utx, wake)) + .expect("spawn worker"); + Self { tx, rx } + } + + pub fn send(&self, c: Command) { + let _ = self.tx.send(c); + } +} + +struct Ctx { + out: Sender, + wake: Arc, +} + +impl Ctx { + fn send(&self, u: Update) { + let _ = self.out.send(u); + (self.wake)(); + } +} + +fn run(rx: Receiver, out: Sender, wake: Arc) { + let ctx = Arc::new(Ctx { out, wake }); + let rt = match tokio::runtime::Runtime::new() { + Ok(rt) => rt, + Err(e) => return ctx.send(Update::Error(e.to_string())), + }; + let mut client = match Client::new() { + Ok(c) => c, + Err(e) => return ctx.send(Update::Error(e.to_string())), + }; + let mut home: Option = None; + let mut live_stop: Option> = None; + let mut watching = false; + + ctx.send(Update::LoggedIn(client.is_logged_in())); + let mut pending = if client.is_logged_in() { vec![Command::Refresh] } else { vec![] }; + + loop { + let cmd = match pending.pop() { + Some(c) => c, + None => match rx.recv() { + Ok(c) => c, + Err(_) => break, + }, + }; + let r: Result<()> = (|| { + match cmd { + Command::Login { email, password } => { + client.login(&email, &password)?; + ctx.send(Update::LoggedIn(true)); + pending.push(Command::Refresh); + } + Command::Logout => { + client.logout()?; + home = None; + ctx.send(Update::LoggedIn(false)); + } + Command::Refresh => { + let h = default_home(&mut client)?; + let status = client.homestatus(&h.id)?; + ctx.send(Update::Home(Box::new(h.clone()), status)); + if let Ok(l) = staircase_lights(&mut client, &h) { + ctx.send(Update::Lights(l)); + } + ctx.send(Update::Events(client.events(&h.id, 30)?)); + if !watching { + watching = true; + watch_rings(&rt, ctx.clone()); + } + home = Some(h); + } + Command::Unlock(id) => { + let h = home.as_ref().ok_or_else(|| Error::Other("not loaded".into()))?; + unlock(&mut client, h, &id)?; + let name = h.module(&id).map(|m| m.name.clone()).unwrap_or(id); + ctx.send(Update::Info(format!("unlock:{name}"))); + } + Command::Light(id, on) => { + let h = home.as_ref().ok_or_else(|| Error::Other("not loaded".into()))?; + light(&mut client, h, &id, on)?; + ctx.send(Update::Info(format!("light:{on}"))); + } + Command::StartLive => { + if let Some(s) = live_stop.take() { + s.notify_one(); + } + let h = home.as_ref().ok_or_else(|| Error::Other("not loaded".into()))?; + let mode = live_mode(h)?; + let ice = call::ice_servers_from_turn(&client.turn()?); + let token = client.token()?; + let stop = Arc::new(Notify::new()); + live_stop = Some(stop.clone()); + start_live(&rt, token, mode, ice, stop, ctx.clone()); + } + Command::StopLive => { + if let Some(s) = live_stop.take() { + s.notify_one(); + } + } + } + Ok(()) + })(); + if let Err(e) = r { + ctx.send(Update::Error(e.to_string())); + } + } +} + +/// Doorbell events from the push WebSocket. +fn watch_rings(rt: &tokio::runtime::Runtime, ctx: Arc) { + // The listener reads fresh tokens through its own client (they are + // shared through tokens.toml); blocking HTTP stays off the async workers. + let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::(); + rt.spawn(async move { + loop { + let tx = tx.clone(); + let token = || tokio::task::block_in_place(|| Client::new().and_then(|mut c| c.token())); + let r = push::listen_ws(token, tx).await; + log::warn!("push WebSocket ended: {r:?}; reconnecting"); + tokio::time::sleep(Duration::from_secs(10)).await; + } + }); + rt.spawn(async move { + while let Some(p) = rx.recv().await { + if p.push_type.ends_with("-incoming_call") { + ctx.send(Update::Ring(p)); + } + } + }); +} + +fn start_live( + rt: &tokio::runtime::Runtime, + token: String, + mode: Mode, + ice: Vec, + stop: Arc, + ctx: Arc, +) { + #[cfg(feature = "gui")] + let on_video = { + let (ftx, frx) = channel::<(bytes::Bytes, bool)>(); + let fctx = ctx.clone(); + std::thread::spawn(move || { + let mut asm = crate::video::FrameAssembler::default(); + let Ok(mut dec) = crate::video::Decoder::new() else { return }; + while let Ok((payload, marker)) = frx.recv() { + if let Some(au) = asm.push(&payload, marker) { + if let Some(f) = dec.decode(&au) { + fctx.send(Update::Frame(f)); + } + } + } + }); + let ftx = std::sync::Mutex::new(ftx); + Some(Arc::new(move |b: &bytes::Bytes, m: bool| { + let _ = ftx.lock().unwrap().send((b.clone(), m)); + }) as call::VideoSink) + }; + #[cfg(not(feature = "gui"))] + let on_video = None; + + let lctx = ctx.clone(); + let log: call::Log = Arc::new(move |_src, v| { + if let Some(s) = v["connection_state"].as_str() { + lctx.send(Update::LiveState(s.to_owned())); + } + }); + let opts = CallOptions { + out_dir: None, + max_duration: Duration::from_secs(10 * 60), + ice_servers: ice, + on_video, + stop: Some(stop), + }; + ctx.send(Update::LiveState("starting".into())); + rt.spawn(async move { + let r = call::run(token, mode, opts, log).await.map_err(|e| e.to_string()); + ctx.send(Update::LiveEnded(r)); + }); +} diff --git a/src/bin/cli.rs b/src/bin/cli.rs index c12b0d5..6b467ec 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -157,7 +157,13 @@ fn run(cli: Cli) -> Result<()> { let report = rt.block_on(bticino_easykit::call::run( token, bticino_easykit::call::Mode::Live { device_id: bridge, module_id: unit }, - bticino_easykit::call::CallOptions { out_dir: out, max_duration: std::time::Duration::from_secs(seconds), ice_servers: ice }, + bticino_easykit::call::CallOptions { + out_dir: Some(out), + max_duration: std::time::Duration::from_secs(seconds), + ice_servers: ice, + on_video: None, + stop: None, + }, log, ))?; println!("{}", serde_json::to_string_pretty(&report).unwrap_or_default()); diff --git a/src/bin/cli/session.rs b/src/bin/cli/session.rs index 1d6e53e..c42e632 100644 --- a/src/bin/cli/session.rs +++ b/src/bin/cli/session.rs @@ -208,9 +208,11 @@ async fn session(client: Arc>, dir: PathBuf, wait_minutes: u64, un let ice = call::ice_servers_from_turn(&api(&client, |c| c.turn()).await?); let token = api(&client, |c| c.token()).await?; let opts = |sub: &str| CallOptions { - out_dir: dir.join(sub), + out_dir: Some(dir.join(sub)), max_duration: Duration::from_secs(30), ice_servers: ice.clone(), + on_video: None, + stop: None, }; if let Some((src, p)) = offer { say(tr("SDP offer received: answering the call from this PC…", "Offerta SDP ricevuta: rispondo alla chiamata da questo PC…")); diff --git a/src/bin/gui/app.rs b/src/bin/gui/app.rs new file mode 100644 index 0000000..be24943 --- /dev/null +++ b/src/bin/gui/app.rs @@ -0,0 +1,641 @@ +//! The egui application: Home, Live, Calls and Settings tabs. + +use std::collections::HashMap; +use std::path::PathBuf; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; + +use bticino_easykit::actions::{Command, Update, Worker}; +use bticino_easykit::i18n::{t, tf, Lang}; +use bticino_easykit::settings::Settings; +use bticino_easykit::{Home, ModuleKind}; +use eframe::egui::{self, Color32, RichText}; +use serde_json::Value; + +#[derive(Clone, Copy, PartialEq, Eq, Debug)] +pub enum Tab { + Home, + Live, + Events, + Settings, +} + +impl Tab { + pub const ALL: [Tab; 4] = [Tab::Home, Tab::Live, Tab::Events, Tab::Settings]; + + fn key(self) -> &'static str { + match self { + Tab::Home => "tab.home", + Tab::Live => "tab.live", + Tab::Events => "tab.events", + Tab::Settings => "tab.settings", + } + } + + fn slug(self) -> &'static str { + match self { + Tab::Home => "home", + Tab::Live => "live", + Tab::Events => "calls", + Tab::Settings => "settings", + } + } +} + +/// State that survives closing the window to the tray. +pub struct Shared { + pub worker: Option, + pub ctx: Option, + pub state: State, + pub quit: bool, +} + +/// Everything the UI shows, fed by worker updates. +#[derive(Default)] +pub struct State { + pub logged_in: Option, + pub home: Option, + pub status: Value, + pub lights: Vec<(String, String)>, + pub events: Value, + pub message: Option<(String, bool)>, + pub live_state: String, + pub live_running: bool, + pub frame: Option<(usize, usize, Vec, u64)>, + pub ring: Option<(Value, Instant)>, + pub busy: bool, +} + +pub type SharedRef = Arc>; +/// Called when someone rings (desktop notification). +pub type OnRing = Arc; + +/// Applies one worker update; returns `true` for a doorbell ring. +pub fn apply(state: &mut State, u: Update, lang: Lang) -> bool { + match u { + Update::LoggedIn(b) => { + state.logged_in = Some(b); + state.busy = false; + if !b { + state.home = None; + } + } + Update::Home(h, s) => { + state.home = Some(*h); + state.status = s; + state.busy = false; + } + Update::Lights(l) => state.lights = l, + Update::Events(e) => state.events = e, + Update::Info(i) => { + state.busy = false; + let msg = match i.split_once(':') { + Some(("unlock", name)) => tf(lang, "opened", name), + _ => i, + }; + state.message = Some((msg, false)); + } + Update::Error(e) => { + state.busy = false; + state.message = Some((tf(lang, "error", &e), true)); + } + Update::LiveState(s) => state.live_state = s, + Update::Frame(f) => { + let n = state.frame.as_ref().map(|f| f.3 + 1).unwrap_or(0); + state.frame = Some((f.width, f.height, f.rgba, n)); + } + Update::LiveEnded(r) => { + state.live_running = false; + state.live_state = match r { + Ok(rep) if rep.ended_by.contains("Max number of peers") => t(lang, "live.busy").to_owned(), + Ok(rep) => tf(lang, "live.ended", &rep.ended_by), + Err(e) => tf(lang, "error", &e), + }; + } + Update::Ring(p) => { + state.ring = Some((p.extra_params, Instant::now())); + return true; + } + } + false +} + +pub struct App { + shared: SharedRef, + settings: Settings, + tab: Tab, + email: String, + password: String, + confirm: Option<(String, String)>, + texture: Option<(egui::TextureHandle, u64)>, + vignettes: HashMap, + vignette_tx: std::sync::mpsc::Sender<(String, Option)>, + vignette_rx: std::sync::mpsc::Receiver<(String, Option)>, + shots: Option, + pub on_ring: OnRing, +} + +enum VignetteState { + Loading, + Ready(egui::TextureHandle), + Failed, +} + +/// `BTICINO_EASYKIT_SCREENSHOTS=`: shoot every tab in both languages, then quit. +struct Screenshots { + dir: PathBuf, + plan: Vec<(Tab, Lang)>, + frames: u32, + pending: bool, + image: Arc>>>, +} + +impl App { + pub fn new(cc: &eframe::CreationContext<'_>, shared: SharedRef, on_ring: OnRing) -> Self { + crate::fonts::install(&cc.egui_ctx); + shared.lock().unwrap().ctx = Some(cc.egui_ctx.clone()); + let settings = Settings::load(); + let (vignette_tx, vignette_rx) = std::sync::mpsc::channel(); + let shots = std::env::var_os("BTICINO_EASYKIT_SCREENSHOTS").map(|d| Screenshots { + dir: d.into(), + plan: Lang::ALL.iter().flat_map(|l| Tab::ALL.iter().map(move |t| (*t, *l))).collect(), + frames: 0, + pending: false, + image: Arc::default(), + }); + Self { + shared, + settings, + tab: Tab::Home, + email: String::new(), + password: String::new(), + confirm: None, + texture: None, + vignettes: HashMap::new(), + vignette_tx, + vignette_rx, + shots, + on_ring, + } + } + + fn lang(&self) -> Lang { + self.settings.lang + } + + fn send(&self, c: Command) { + let mut s = self.shared.lock().unwrap(); + s.state.busy = true; + if let Some(w) = &s.worker { + w.send(c); + } + } + + fn drain(&mut self, ctx: &egui::Context) { + let lang = self.lang(); + let mut rings = Vec::new(); + { + let mut s = self.shared.lock().unwrap(); + let updates: Vec = match &s.worker { + Some(w) => w.rx.try_iter().collect(), + None => Vec::new(), + }; + for u in updates { + if apply(&mut s.state, u, lang) { + rings.push(s.state.ring.as_ref().map(|r| r.0.clone()).unwrap_or_default()); + } + } + } + for r in rings { + if self.settings.notify_on_ring { + (self.on_ring)(&r, lang); + } + ctx.send_viewport_cmd(egui::ViewportCommand::Focus); + self.tab = Tab::Home; + } + while let Ok((url, img)) = self.vignette_rx.try_recv() { + let v = match img { + Some(img) => VignetteState::Ready(ctx.load_texture(&url, img, egui::TextureOptions::LINEAR)), + None => VignetteState::Failed, + }; + self.vignettes.insert(url, v); + } + } + + fn vignette(&mut self, url: &str) -> Option { + match self.vignettes.get(url) { + Some(VignetteState::Ready(t)) => Some(t.clone()), + Some(_) => None, + None => { + self.vignettes.insert(url.to_owned(), VignetteState::Loading); + let (tx, url) = (self.vignette_tx.clone(), url.to_owned()); + let ctx = self.shared.lock().unwrap().ctx.clone(); + std::thread::spawn(move || { + let img = fetch_image(&url); + let _ = tx.send((url, img)); + if let Some(c) = ctx { + c.request_repaint(); + } + }); + None + } + } + } + + fn screenshots(&mut self, ctx: &egui::Context) { + let Some(sh) = &mut self.shots else { return }; + let shot = sh.image.lock().unwrap().take(); + if let Some(img) = shot { + if let Some((tab, lang)) = sh.plan.first().copied() { + let _ = std::fs::create_dir_all(&sh.dir); + let path = sh.dir.join(format!("{}-{}.png", tab.slug(), if lang == Lang::It { "it" } else { "en" })); + let [w, h] = img.size; + let raw: Vec = img.pixels.iter().flat_map(|c| c.to_array()).collect(); + let _ = image::save_buffer(&path, &raw, w as u32, h as u32, image::ColorType::Rgba8); + eprintln!("screenshot {}", path.display()); + sh.plan.remove(0); + } + sh.pending = false; + sh.frames = 0; + } + match sh.plan.first().copied() { + None => ctx.send_viewport_cmd(egui::ViewportCommand::Close), + Some((tab, lang)) => { + self.tab = tab; + self.settings.lang = lang; + sh.frames += 1; + if sh.frames > 5 && !sh.pending { + sh.pending = true; + let (slot, c) = (sh.image.clone(), ctx.clone()); + ctx.request_screenshot(move |img| { + *slot.lock().unwrap() = Some(img); + c.request_repaint(); + }); + } + ctx.request_repaint(); + } + } + } +} + +fn fetch_image(url: &str) -> Option { + let bytes = reqwest::blocking::get(url).ok()?.bytes().ok()?; + let img = image::load_from_memory(&bytes).ok()?.to_rgba8(); + Some(egui::ColorImage::from_rgba_unmultiplied([img.width() as usize, img.height() as usize], img.as_raw())) +} + +impl eframe::App for App { + fn logic(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + self.drain(ctx); + self.screenshots(ctx); + let close = ctx.input(|i| i.viewport().close_requested()); + if close && !self.settings.tray { + self.shared.lock().unwrap().quit = true; + } + } + + fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + let lang = self.lang(); + let ctx = ui.ctx().clone(); + let logged_in = self.shared.lock().unwrap().state.logged_in; + + egui::Panel::top("tabs").show(ui, |ui| { + ui.horizontal(|ui| { + ui.heading(t(lang, "app.title")); + ui.separator(); + if logged_in == Some(true) { + for tab in Tab::ALL { + ui.selectable_value(&mut self.tab, tab, t(lang, tab.key())); + } + } + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if self.shared.lock().unwrap().state.busy { + ui.spinner(); + } + }); + }); + }); + + egui::Panel::bottom("status").show(ui, |ui| { + let msg = self.shared.lock().unwrap().state.message.clone(); + match msg { + Some((m, true)) => ui.colored_label(Color32::from_rgb(220, 80, 80), m), + Some((m, false)) => ui.label(m), + None => ui.label(""), + }; + }); + + egui::CentralPanel::default().show(ui, |ui| match logged_in { + None => { + ui.spinner(); + } + Some(false) => self.login(ui), + Some(true) => { + self.ring_banner(ui); + match self.tab { + Tab::Home => self.home(ui), + Tab::Live => self.live(ui), + Tab::Events => self.events(ui), + Tab::Settings => self.settings_tab(ui), + } + } + }); + + if let Some((id, name)) = self.confirm.clone() { + let r = egui::Modal::new(egui::Id::unique("confirm-open")).show(&ctx, |ui| { + ui.label(RichText::new(tf(lang, "confirm.open", &name)).size(18.0)); + ui.add_space(8.0); + ui.horizontal(|ui| { + if ui.button(t(lang, "confirm.yes")).clicked() { + self.send(Command::Unlock(id.clone())); + self.confirm = None; + } + if ui.button(t(lang, "confirm.no")).clicked() { + self.confirm = None; + } + }); + }); + if r.should_close() { + self.confirm = None; + } + } + } +} + +impl App { + fn login(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + ui.add_space(24.0); + ui.vertical_centered(|ui| { + ui.heading(t(lang, "login.title")); + ui.add_space(12.0); + egui::Grid::new("login").num_columns(2).show(ui, |ui| { + ui.label(t(lang, "login.email")); + ui.text_edit_singleline(&mut self.email); + ui.end_row(); + ui.label(t(lang, "login.password")); + let pw = ui.add(egui::TextEdit::singleline(&mut self.password).password(true)); + ui.end_row(); + let enter = pw.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter)); + if (ui.button(t(lang, "login.button")).clicked() || enter) && !self.email.is_empty() { + let password = std::mem::take(&mut self.password); + self.send(Command::Login { email: self.email.trim().to_owned(), password }); + } + ui.end_row(); + }); + ui.add_space(8.0); + ui.weak(t(lang, "login.note")); + }); + } + + fn ring_banner(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + let ring = self.shared.lock().unwrap().state.ring.clone(); + if let Some((params, at)) = ring { + if at.elapsed() > Duration::from_secs(60) { + return; + } + egui::Frame::new().fill(Color32::from_rgb(46, 157, 91)).corner_radius(6.0).inner_margin(10.0).show(ui, |ui| { + ui.horizontal(|ui| { + if let Some(url) = params["vignette_url"].as_str().or(params["snapshot_url"].as_str()) { + if let Some(tex) = self.vignette(url) { + ui.add(egui::Image::new(&tex).max_height(90.0)); + } + } + ui.label(RichText::new(t(lang, "ring.title")).size(20.0).color(Color32::WHITE)); + }); + }); + ui.add_space(8.0); + ui.ctx().request_repaint_after(Duration::from_secs(1)); + } + } + + fn home(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + let (home, status, lights) = { + let s = self.shared.lock().unwrap(); + (s.state.home.clone(), s.state.status.clone(), s.state.lights.clone()) + }; + let Some(home) = home else { + ui.spinner(); + return; + }; + ui.horizontal(|ui| { + ui.heading(&home.name); + if ui.button(format!("⟳ {}", t(lang, "refresh"))).clicked() { + self.send(Command::Refresh); + } + }); + let mods = status["body"]["home"]["modules"].as_array().cloned().unwrap_or_default(); + if let Some(b) = home.bridge() { + let st = mods.iter().find(|m| m["id"] == b.id.as_str()).cloned().unwrap_or_default(); + let online = st["reachable"].as_bool().unwrap_or(false); + egui::Grid::new("bridge").num_columns(2).show(ui, |ui| { + ui.label(&b.name); + ui.colored_label( + if online { Color32::from_rgb(46, 157, 91) } else { Color32::from_rgb(220, 80, 80) }, + format!("● {}", t(lang, if online { "home.online" } else { "home.offline" })), + ); + ui.end_row(); + ui.label(t(lang, "home.firmware")); + ui.label(st["firmware_name"].as_str().unwrap_or("-")); + ui.end_row(); + ui.label(t(lang, "home.wifi")); + ui.label(st["wifi_strength"].as_u64().map(|w| format!("{w}")).unwrap_or_else(|| "-".into())); + ui.end_row(); + }); + } + ui.add_space(12.0); + ui.heading(t(lang, "home.locks")); + for m in home.by_kind(ModuleKind::DoorLock) { + ui.horizontal(|ui| { + ui.label(RichText::new(&m.name).size(16.0)); + if ui.add(egui::Button::new(RichText::new(format!("🔓 {}", t(lang, "home.open"))).size(16.0))).clicked() { + self.confirm = Some((m.id.clone(), m.name.clone())); + } + }); + } + if !lights.is_empty() { + ui.add_space(12.0); + ui.heading(t(lang, "home.light")); + for (id, name) in lights { + ui.horizontal(|ui| { + ui.label(&name); + if ui.button(t(lang, "home.on")).clicked() { + self.send(Command::Light(id.clone(), true)); + } + if ui.button(t(lang, "home.off")).clicked() { + self.send(Command::Light(id.clone(), false)); + } + }); + } + } + } + + fn live(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + let (running, state, frame) = { + let s = self.shared.lock().unwrap(); + (s.state.live_running, s.state.live_state.clone(), s.state.frame.clone()) + }; + ui.horizontal(|ui| { + if running { + if ui.button(format!("■ {}", t(lang, "live.stop"))).clicked() { + self.send(Command::StopLive); + } + } else if ui.button(format!("▶ {}", t(lang, "live.start"))).clicked() { + let mut s = self.shared.lock().unwrap(); + s.state.live_running = true; + s.state.frame = None; + drop(s); + self.texture = None; + self.send(Command::StartLive); + } + if running && state != "connected" { + ui.spinner(); + ui.label(t(lang, "live.connecting")); + } else if !running { + ui.label(&state); + } + }); + if let Some((w, h, rgba, n)) = frame { + if self.texture.as_ref().map(|t| t.1) != Some(n) { + let img = egui::ColorImage::from_rgba_unmultiplied([w, h], &rgba); + match &mut self.texture { + Some((tex, seq)) => { + tex.set(img, egui::TextureOptions::LINEAR); + *seq = n; + } + None => self.texture = Some((ui.ctx().load_texture("live", img, egui::TextureOptions::LINEAR), n)), + } + } + } + if let Some((tex, _)) = &self.texture { + ui.add(egui::Image::new(tex).max_width(ui.available_width()).max_height(ui.available_height()).maintain_aspect_ratio(true)); + } + } + + fn events(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + let events = self.shared.lock().unwrap().state.events.clone(); + let list = events["body"]["home"]["events"].as_array().cloned().unwrap_or_default(); + let calls: Vec<&Value> = list.iter().filter(|e| e["type"] == "outdoor").collect(); + if calls.is_empty() { + ui.label(t(lang, "events.empty")); + return; + } + egui::ScrollArea::vertical().show(ui, |ui| { + for e in calls { + let sub = &e["subevents"][0]; + let kind = match sub["type"].as_str() { + Some("accepted_call") => t(lang, "events.accepted"), + Some("missed_call") => t(lang, "events.missed"), + _ => t(lang, "events.incoming"), + }; + ui.horizontal(|ui| { + if let Some(url) = sub["vignette"]["url"].as_str() { + match self.vignette(url) { + Some(tex) => ui.add(egui::Image::new(&tex).max_height(72.0)), + None => ui.add_sized([96.0, 72.0], egui::Spinner::new()), + }; + } + ui.vertical(|ui| { + ui.label(RichText::new(kind).strong()); + ui.label(format_time(e["time"].as_i64().unwrap_or(0))); + ui.weak(sub["message"].as_str().unwrap_or("")); + }); + }); + ui.separator(); + } + }); + } + + fn settings_tab(&mut self, ui: &mut egui::Ui) { + let lang = self.lang(); + let before = self.settings.clone(); + egui::Grid::new("settings").num_columns(2).spacing([16.0, 10.0]).show(ui, |ui| { + ui.label(t(lang, "settings.language")); + egui::ComboBox::from_id_salt("lang").selected_text(self.settings.lang.name()).show_ui(ui, |ui| { + for l in Lang::ALL { + ui.selectable_value(&mut self.settings.lang, l, l.name()); + } + }); + ui.end_row(); + ui.label(""); + ui.checkbox(&mut self.settings.autostart, t(lang, "settings.autostart")); + ui.end_row(); + ui.label(""); + ui.checkbox(&mut self.settings.tray, t(lang, "settings.tray")); + ui.end_row(); + ui.label(""); + ui.checkbox(&mut self.settings.notify_on_ring, t(lang, "settings.notify")); + ui.end_row(); + ui.label(t(lang, "settings.account")); + if ui.button(t(lang, "logout")).clicked() { + self.send(Command::Logout); + } + ui.end_row(); + }); + if self.settings != before && self.shots.is_none() { + if self.settings.autostart != before.autostart { + if let Err(e) = crate::autostart::set(self.settings.autostart) { + self.shared.lock().unwrap().state.message = Some((tf(lang, "error", &e.to_string()), true)); + } + } + let _ = self.settings.save(); + } + } +} + +/// Local time `YYYY-MM-DD HH:MM` without pulling a time-zone crate. +fn format_time(unix: i64) -> String { + let offset = local_offset_secs(); + let secs = unix + offset; + let days = secs.div_euclid(86_400); + let rem = secs.rem_euclid(86_400); + // Civil-from-days (Howard Hinnant). + let z = days + 719_468; + let era = z.div_euclid(146_097); + let doe = z - era * 146_097; + let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365; + let y = yoe + era * 400; + let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); + let mp = (5 * doy + 2) / 153; + let d = doy - (153 * mp + 2) / 5 + 1; + let m = if mp < 10 { mp + 3 } else { mp - 9 }; + let y = if m <= 2 { y + 1 } else { y }; + format!("{y:04}-{m:02}-{d:02} {:02}:{:02}", rem / 3600, rem % 3600 / 60) +} + +fn local_offset_secs() -> i64 { + static OFFSET: std::sync::OnceLock = std::sync::OnceLock::new(); + *OFFSET.get_or_init(read_offset) +} + +fn read_offset() -> i64 { + // `date +%z` is good enough on Linux; Windows falls back to UTC. + #[cfg(unix)] + if let Ok(o) = std::process::Command::new("date").arg("+%z").output() { + let s = String::from_utf8_lossy(&o.stdout); + let s = s.trim(); + if s.len() == 5 { + let sign = if s.starts_with('-') { -1 } else { 1 }; + let h: i64 = s[1..3].parse().unwrap_or(0); + let m: i64 = s[3..5].parse().unwrap_or(0); + return sign * (h * 3600 + m * 60); + } + } + 0 +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn civil_date() { + // 2026-10-21 12:00:00 UTC + let s = format_time(1792584000 - local_offset_secs()); + assert_eq!(s, "2026-10-21 12:00"); + } +} diff --git a/src/bin/gui/autostart.rs b/src/bin/gui/autostart.rs new file mode 100644 index 0000000..594bc2e --- /dev/null +++ b/src/bin/gui/autostart.rs @@ -0,0 +1,43 @@ +//! Start with the session: XDG autostart on Linux, the `Run` key on Windows. + +#[cfg(target_os = "linux")] +pub fn set(enabled: bool) -> std::io::Result<()> { + let dir = dirs::config_dir().ok_or_else(|| std::io::Error::other("no config dir"))?.join("autostart"); + let file = dir.join("bticino-easykit.desktop"); + if !enabled { + return match std::fs::remove_file(&file) { + Err(e) if e.kind() != std::io::ErrorKind::NotFound => Err(e), + _ => Ok(()), + }; + } + std::fs::create_dir_all(&dir)?; + let exe = std::env::current_exe()?; + std::fs::write( + file, + format!( + "[Desktop Entry]\nType=Application\nName=BTicino EASYKIT\nExec=\"{}\" --minimized\nIcon=bticino-easykit\nX-GNOME-Autostart-enabled=true\n", + exe.display() + ), + ) +} + +#[cfg(windows)] +pub fn set(enabled: bool) -> std::io::Result<()> { + use winreg::enums::{HKEY_CURRENT_USER, KEY_SET_VALUE}; + let run = winreg::RegKey::predef(HKEY_CURRENT_USER) + .open_subkey_with_flags(r"Software\Microsoft\Windows\CurrentVersion\Run", KEY_SET_VALUE)?; + if enabled { + let exe = std::env::current_exe()?; + run.set_value("BTicinoEasykit", &format!("\"{}\" --minimized", exe.display())) + } else { + match run.delete_value("BTicinoEasykit") { + Err(e) if e.kind() != std::io::ErrorKind::NotFound => Err(e), + _ => Ok(()), + } + } +} + +#[cfg(not(any(target_os = "linux", windows)))] +pub fn set(_enabled: bool) -> std::io::Result<()> { + Err(std::io::Error::other("autostart is not supported on this system")) +} diff --git a/src/bin/gui/demo.rs b/src/bin/gui/demo.rs new file mode 100644 index 0000000..24ff35a --- /dev/null +++ b/src/bin/gui/demo.rs @@ -0,0 +1,50 @@ +//! Fake data for `BTICINO_EASYKIT_DEMO=1` (screenshots without real homes). + +use bticino_easykit::model::parse_homes; +use serde_json::json; + +use crate::app::State; + +pub fn state() -> State { + let topo = json!({"body": {"homes": [{ + "id": "demo", "name": "Demo home", "timezone": "Europe/Rome", + "modules": [ + {"id": "00:03:50:00:00:01", "type": "BDIY", "name": "Indoor monitor"}, + {"id": "eu-1", "type": "BNEU", "name": "Street panel", "bridge": "00:03:50:00:00:01"}, + {"id": "dl-1", "type": "BNDL", "name": "Pedestrian gate", "bridge": "00:03:50:00:00:01"}, + {"id": "dl-2", "type": "BNDL", "name": "Garage gate", "bridge": "00:03:50:00:00:01"} + ]}]}}); + let status = json!({"body": {"home": {"modules": [ + {"id": "00:03:50:00:00:01", "reachable": true, "firmware_name": "1.00.11", "wifi_strength": 48} + ]}}}); + let call = |time: i64, kind: &str, msg: &str| { + json!({"type": "outdoor", "time": time, "subevents": [{"type": kind, "message": msg}]}) + }; + let events = json!({"body": {"home": {"events": [ + call(1792600574, "missed_call", "Missed call"), + call(1792506393, "accepted_call", "Answered by Indoor monitor"), + call(1791307246, "accepted_call", "Answered by Indoor monitor"), + ]}}}); + // A synthetic 640x480 test pattern stands in for the camera. + let (w, h) = (640usize, 480usize); + let mut rgba = Vec::with_capacity(w * h * 4); + for y in 0..h { + for x in 0..w { + let band = (x * 7 / w) as u8; + let c = [[200, 200, 200], [200, 200, 40], [40, 200, 200], [40, 200, 40], [200, 40, 200], [200, 40, 40], [40, 40, 200]][band as usize]; + let shade = 0.6 + 0.4 * (y as f32 / h as f32); + rgba.extend_from_slice(&[(c[0] as f32 * shade) as u8, (c[1] as f32 * shade) as u8, (c[2] as f32 * shade) as u8, 255]); + } + } + State { + logged_in: Some(true), + home: parse_homes(&topo).into_iter().next(), + status, + lights: vec![("sl-1".into(), "Staircase light".into())], + events, + live_state: "connected".into(), + live_running: true, + frame: Some((w, h, rgba, 0)), + ..Default::default() + } +} diff --git a/src/bin/gui/fonts.rs b/src/bin/gui/fonts.rs new file mode 100644 index 0000000..569db5b --- /dev/null +++ b/src/bin/gui/fonts.rs @@ -0,0 +1,25 @@ +//! Fallback font for symbols egui's bundled fonts lack (arrows, dots, ■ ▶). + +use eframe::egui; + +const CANDIDATES: &[&str] = &[ + // Linux + "/usr/share/fonts/TTF/DejaVuSans.ttf", + "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", + "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf", + "/usr/share/fonts/noto/NotoSansSymbols2-Regular.ttf", + "/usr/share/fonts/google-noto/NotoSansSymbols2-Regular.ttf", + // Windows + "C:\\Windows\\Fonts\\seguisym.ttf", + "C:\\Windows\\Fonts\\segoeui.ttf", +]; + +pub fn install(ctx: &egui::Context) { + let Some(bytes) = CANDIDATES.iter().find_map(|p| std::fs::read(p).ok()) else { return }; + let mut fonts = egui::FontDefinitions::default(); + fonts.font_data.insert("fallback".into(), std::sync::Arc::new(egui::FontData::from_owned(bytes))); + for family in [egui::FontFamily::Proportional, egui::FontFamily::Monospace] { + fonts.families.entry(family).or_default().push("fallback".into()); + } + ctx.set_fonts(fonts); +} diff --git a/src/bin/gui/main.rs b/src/bin/gui/main.rs new file mode 100644 index 0000000..cdab1d7 --- /dev/null +++ b/src/bin/gui/main.rs @@ -0,0 +1,136 @@ +//! Desktop app for the BTicino EASYKIT. +//! +//! Environment: +//! - `BTICINO_EASYKIT_DEMO=1`: fake data, no network (for screenshots); +//! - `BTICINO_EASYKIT_SCREENSHOTS=`: save every tab in both languages, then quit; +//! - `BTICINO_EASYKIT_CONFIG_DIR`, `BTICINO_EASYKIT_DEBUG=1`: see the library. +#![cfg_attr(windows, windows_subsystem = "windows")] + +mod app; +mod autostart; +mod demo; +mod fonts; +mod single; +mod tray; + +use std::sync::mpsc::channel; +use std::sync::{Arc, Mutex}; +use std::time::Duration; + +use app::{App, Shared, SharedRef, State}; +use bticino_easykit::actions::Worker; +use bticino_easykit::i18n::{t, Lang}; +use bticino_easykit::settings::Settings; +use eframe::egui; +use serde_json::Value; +use tray::TrayEvent; + +fn notify_ring(params: &Value, lang: Lang) { + let body = params["home_name"].as_str().unwrap_or("BTicino"); + let r = notify_rust::Notification::new() + .summary(t(lang, "ring.title")) + .body(body) + .icon("bticino-easykit") + .appname("BTicino EASYKIT") + .show(); + if let Err(e) = r { + log::warn!("notification failed: {e}"); + } +} + +fn native_options() -> eframe::NativeOptions { + let icon = eframe::icon_data::from_png_bytes(include_bytes!("../../../assets/icons/bticino-easykit-256.png")).ok(); + let mut viewport = egui::ViewportBuilder::default() + .with_title("BTicino EASYKIT") + .with_app_id("bticino-easykit") + .with_inner_size([820.0, 620.0]) + .with_min_inner_size([480.0, 380.0]); + if let Some(icon) = icon { + viewport = viewport.with_icon(Arc::new(icon)); + } + eframe::NativeOptions { viewport, ..Default::default() } +} + +fn main() { + let _ = env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).try_init(); + let demo = std::env::var("BTICINO_EASYKIT_DEMO").is_ok_and(|v| v == "1"); + let screenshots = std::env::var_os("BTICINO_EASYKIT_SCREENSHOTS").is_some(); + let start_hidden = std::env::args().any(|a| a == "--minimized"); + + let (ctl_tx, ctl_rx) = channel::(); + if !screenshots { + let (show_tx, show_rx) = channel::<()>(); + if let single::Instance::Other = single::claim(show_tx) { + return; + } + let tx = ctl_tx.clone(); + std::thread::spawn(move || { + while show_rx.recv().is_ok() { + let _ = tx.send(TrayEvent::Show); + } + }); + } + + let shared: SharedRef = Arc::new(Mutex::new(Shared { worker: None, ctx: None, state: State::default(), quit: false })); + if demo { + shared.lock().unwrap().state = demo::state(); + } else { + let s = shared.clone(); + let worker = Worker::spawn(move || { + // Repaint the window if open; otherwise the hidden loop polls. + if let Some(ctx) = s.try_lock().ok().and_then(|g| g.ctx.clone()) { + ctx.request_repaint(); + } + }); + shared.lock().unwrap().worker = Some(worker); + } + + let settings = Settings::load(); + if !screenshots && settings.tray { + tray::spawn(ctl_tx.clone(), settings.lang); + } + let on_ring: app::OnRing = Arc::new(notify_ring); + + let mut hidden = start_hidden && settings.tray; + loop { + if !hidden { + let (sh, ring) = (shared.clone(), on_ring.clone()); + let r = eframe::run_native( + "bticino-easykit", + native_options(), + Box::new(move |cc| Ok(Box::new(App::new(cc, sh, ring)))), + ); + shared.lock().unwrap().ctx = None; + if let Err(e) = r { + eprintln!("window error: {e}"); + return; + } + let s = Settings::load(); + if screenshots || shared.lock().unwrap().quit || !s.tray { + return; + } + } + // Window closed to the tray (closing and re-creating it also works on + // Wayland, where a window cannot be hidden). Keep watching for rings. + hidden = true; + while hidden { + match ctl_rx.recv_timeout(Duration::from_millis(200)) { + Ok(TrayEvent::Show) => hidden = false, + Ok(TrayEvent::Quit) => return, + Err(_) => {} + } + let lang = Settings::load().lang; + let mut g = shared.lock().unwrap(); + let updates: Vec<_> = g.worker.as_ref().map(|w| w.rx.try_iter().collect()).unwrap_or_default(); + for u in updates { + if app::apply(&mut g.state, u, lang) { + let p = g.state.ring.as_ref().map(|r| r.0.clone()).unwrap_or_default(); + if Settings::load().notify_on_ring { + notify_ring(&p, lang); + } + hidden = false; + } + } + } + } +} diff --git a/src/bin/gui/single.rs b/src/bin/gui/single.rs new file mode 100644 index 0000000..7c3726c --- /dev/null +++ b/src/bin/gui/single.rs @@ -0,0 +1,42 @@ +//! Single instance: the first copy listens on a loopback port; a second +//! copy asks it to show its window and exits. + +use std::io::{Read, Write}; +use std::net::{TcpListener, TcpStream}; +use std::sync::mpsc::Sender; +use std::time::Duration; + +const ADDR: &str = "127.0.0.1:47613"; +const MAGIC: &[u8] = b"bticino-easykit:show"; + +pub enum Instance { + First, + Other, +} + +/// Becomes the primary instance (sending `()` on `show` when another copy +/// starts) or tells the running one to show itself. +pub fn claim(show: Sender<()>) -> Instance { + match TcpListener::bind(ADDR) { + Ok(l) => { + std::thread::spawn(move || { + for mut s in l.incoming().flatten() { + let mut buf = [0u8; 32]; + let _ = s.set_read_timeout(Some(Duration::from_secs(1))); + if let Ok(n) = s.read(&mut buf) { + if &buf[..n] == MAGIC { + let _ = show.send(()); + } + } + } + }); + Instance::First + } + Err(_) => { + if let Ok(mut s) = TcpStream::connect_timeout(&ADDR.parse().unwrap(), Duration::from_secs(1)) { + let _ = s.write_all(MAGIC); + } + Instance::Other + } + } +} diff --git a/src/bin/gui/tray.rs b/src/bin/gui/tray.rs new file mode 100644 index 0000000..38e01e5 --- /dev/null +++ b/src/bin/gui/tray.rs @@ -0,0 +1,130 @@ +//! System tray icon with Show / Quit: `ksni` (StatusNotifierItem, tokio +//! backend) on Linux, `tray-icon` with its own Win32 message loop on Windows. + +use std::sync::mpsc::Sender; + +use bticino_easykit::i18n::{t, Lang}; + +#[derive(Debug, Clone, Copy)] +pub enum TrayEvent { + Show, + Quit, +} + +fn icon_rgba() -> Option<(u32, u32, Vec)> { + let img = image::load_from_memory(include_bytes!("../../../assets/icons/bticino-easykit-64.png")).ok()?.to_rgba8(); + Some((img.width(), img.height(), img.into_raw())) +} + +#[cfg(target_os = "linux")] +pub fn spawn(tx: Sender, lang: Lang) { + use ksni::TrayMethods; + + struct Tray { + tx: Sender, + lang: Lang, + } + + impl ksni::Tray for Tray { + fn id(&self) -> String { + "bticino-easykit".into() + } + fn title(&self) -> String { + t(self.lang, "app.title").into() + } + fn icon_name(&self) -> String { + "bticino-easykit".into() + } + fn icon_pixmap(&self) -> Vec { + // ksni wants ARGB32 in network byte order. + icon_rgba() + .map(|(w, h, rgba)| { + let data = rgba.chunks_exact(4).flat_map(|p| [p[3], p[0], p[1], p[2]]).collect(); + vec![ksni::Icon { width: w as i32, height: h as i32, data }] + }) + .unwrap_or_default() + } + fn activate(&mut self, _x: i32, _y: i32) { + let _ = self.tx.send(TrayEvent::Show); + } + fn menu(&self) -> Vec> { + use ksni::menu::StandardItem; + vec![ + StandardItem { + label: t(self.lang, "tray.show").into(), + activate: Box::new(|s: &mut Self| { + let _ = s.tx.send(TrayEvent::Show); + }), + ..Default::default() + } + .into(), + ksni::MenuItem::Separator, + StandardItem { + label: t(self.lang, "tray.quit").into(), + activate: Box::new(|s: &mut Self| { + let _ = s.tx.send(TrayEvent::Quit); + }), + ..Default::default() + } + .into(), + ] + } + } + + std::thread::spawn(move || { + let Ok(rt) = tokio::runtime::Builder::new_current_thread().enable_all().build() else { return }; + rt.block_on(async move { + match (Tray { tx, lang }).spawn().await { + // Keep the handle (and the D-Bus service) alive forever. + Ok(_handle) => std::future::pending::<()>().await, + Err(e) => log::warn!("tray unavailable: {e}"), + } + }); + }); +} + +#[cfg(windows)] +pub fn spawn(tx: Sender, lang: Lang) { + use tray_icon::menu::{Menu, MenuEvent, MenuItem, PredefinedMenuItem}; + use tray_icon::{MouseButton, TrayIconBuilder, TrayIconEvent}; + use windows_sys::Win32::UI::WindowsAndMessaging::{DispatchMessageW, PeekMessageW, TranslateMessage, MSG, PM_REMOVE}; + + std::thread::spawn(move || { + // The icon must live on a thread that pumps Win32 messages. + let show = MenuItem::new(t(lang, "tray.show"), true, None); + let quit = MenuItem::new(t(lang, "tray.quit"), true, None); + let menu = Menu::new(); + let _ = menu.append(&show); + let _ = menu.append(&PredefinedMenuItem::separator()); + let _ = menu.append(&quit); + let mut builder = TrayIconBuilder::new().with_menu(Box::new(menu)).with_tooltip(t(lang, "app.title")); + if let Some(icon) = icon_rgba().and_then(|(w, h, rgba)| tray_icon::Icon::from_rgba(rgba, w, h).ok()) { + builder = builder.with_icon(icon); + } + let Ok(_tray) = builder.build() else { return }; + loop { + unsafe { + let mut msg: MSG = std::mem::zeroed(); + while PeekMessageW(&mut msg, std::ptr::null_mut(), 0, 0, PM_REMOVE) != 0 { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } + } + while let Ok(e) = MenuEvent::receiver().try_recv() { + let ev = if e.id == *show.id() { TrayEvent::Show } else if e.id == *quit.id() { TrayEvent::Quit } else { continue }; + if tx.send(ev).is_err() { + return; + } + } + while let Ok(e) = TrayIconEvent::receiver().try_recv() { + if let TrayIconEvent::DoubleClick { button: MouseButton::Left, .. } = e { + let _ = tx.send(TrayEvent::Show); + } + } + std::thread::sleep(std::time::Duration::from_millis(50)); + } + }); +} + +#[cfg(not(any(target_os = "linux", windows)))] +pub fn spawn(_tx: Sender, _lang: Lang) {} diff --git a/src/call.rs b/src/call.rs index 8922842..ac822f9 100644 --- a/src/call.rs +++ b/src/call.rs @@ -62,11 +62,19 @@ pub enum Mode { Answer { session: RtcSession, offer_sdp: String }, } +/// Receives every video RTP packet (payload, marker bit). +pub type VideoSink = Arc; + +#[derive(Clone)] pub struct CallOptions { - pub out_dir: PathBuf, + /// Where to save `video.h264`, `audio.ogg` and the SDPs; `None` saves nothing. + pub out_dir: Option, /// Hang up after this long (if the device has not already). pub max_duration: Duration, pub ice_servers: Vec, + pub on_video: Option, + /// Hang up as soon as this is notified. + pub stop: Option>, } #[derive(Debug, Default, Clone, serde::Serialize)] @@ -133,6 +141,7 @@ struct Handler { cand_tx: mpsc::UnboundedSender, video: Arc>>>, audio: Arc>>>, + on_video: Option, stats: Arc, } @@ -188,11 +197,15 @@ impl PeerConnectionEventHandler for Handler { }); } let w = self.video.clone(); + let sink = self.on_video.clone(); tokio::spawn(async move { while let Some(ev) = track.poll().await { if let TrackRemoteEvent::OnRtpPacket(pkt) = ev { stats.video_packets.fetch_add(1, Ordering::Relaxed); stats.video_bytes.fetch_add(pkt.payload.len() as u64, Ordering::Relaxed); + if let Some(sink) = &sink { + sink(&pkt.payload, pkt.header.marker); + } if let Some(w) = w.lock().unwrap().as_mut() { let _ = w.write_rtp(&pkt); } @@ -266,15 +279,26 @@ async fn send(ws: &mut Ws, log: &Log, v: Value) -> crate::Result<()> { } /// Runs one call until the device hangs up, the connection fails or -/// `max_duration` elapses. Media is written to `out_dir/{video.h264,audio.ogg}`. +/// `max_duration` elapses or `stop` fires. Media can be saved to `out_dir`. pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crate::Result { let started = Instant::now(); let other = |e: webrtc::error::Error| crate::Error::Other(format!("webrtc: {e}")); - std::fs::create_dir_all(&opts.out_dir)?; - let video = Arc::new(Mutex::new(Some(H26xWriter::new(File::create(opts.out_dir.join("video.h264"))?, false)))); - let audio = Arc::new(Mutex::new(Some( - OggWriter::new(File::create(opts.out_dir.join("audio.ogg"))?, 48000, 2).map_err(|e| crate::Error::Other(e.to_string()))?, - ))); + let (video, audio) = match &opts.out_dir { + Some(dir) => { + std::fs::create_dir_all(dir)?; + ( + Some(H26xWriter::new(File::create(dir.join("video.h264"))?, false)), + Some(OggWriter::new(File::create(dir.join("audio.ogg"))?, 48000, 2).map_err(|e| crate::Error::Other(e.to_string()))?), + ) + } + None => (None, None), + }; + let (video, audio) = (Arc::new(Mutex::new(video)), Arc::new(Mutex::new(audio))); + let save = |name: &str, text: &str| { + if let Some(dir) = &opts.out_dir { + let _ = std::fs::write(dir.join(name), text); + } + }; let (audio_codec, video_codec) = codecs(); let mut me = MediaEngine::default(); @@ -299,6 +323,7 @@ pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crat cand_tx, video: video.clone(), audio: audio.clone(), + on_video: opts.on_video.clone(), stats: stats.clone(), }); let runtime = default_runtime().ok_or_else(|| crate::Error::Other("no async runtime".into()))?; @@ -349,20 +374,20 @@ pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crat pc.set_local_description(offer).await.map_err(other)?; let _ = tokio::time::timeout(Duration::from_secs(5), gathered.notified()).await; let sdp = pc.local_description().await.map(|d| d.sdp).unwrap_or_default(); - let _ = std::fs::write(opts.out_dir.join("sdp-local.txt"), &sdp); + save("sdp-local.txt", &sdp); let corr = (std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap_or_default().as_millis()).to_string(); send(&mut ws, &log, p::rtc_offer(&device_id, &corr, &sdp, module_id.as_deref())).await?; RtcSession { session_id: String::new(), tag_id: String::new(), device_id, correlation_id: corr } } Mode::Answer { session, offer_sdp } => { - let _ = std::fs::write(opts.out_dir.join("sdp-remote.txt"), &offer_sdp); + save("sdp-remote.txt", &offer_sdp); pc.set_remote_description(RTCSessionDescription::offer(offer_sdp).map_err(other)?).await.map_err(other)?; pc.add_track(mic.clone() as Arc).await.map_err(other)?; let answer = pc.create_answer(None).await.map_err(other)?; pc.set_local_description(answer).await.map_err(other)?; let _ = tokio::time::timeout(Duration::from_secs(5), gathered.notified()).await; let sdp = pc.local_description().await.map(|d| d.sdp).unwrap_or_default(); - let _ = std::fs::write(opts.out_dir.join("sdp-local.txt"), &sdp); + save("sdp-local.txt", &sdp); send(&mut ws, &log, p::rtc_answer(&session, &sdp)).await?; can_trickle = true; session @@ -393,9 +418,11 @@ pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crat let deadline = tokio::time::sleep(opts.max_duration); tokio::pin!(deadline); + let stop = opts.stop.clone().unwrap_or_default(); let ended_by = loop { tokio::select! { _ = &mut deadline => break "timeout (we hung up)".to_owned(), + _ = stop.notified() => break "stopped (we hung up)".to_owned(), Some(c) = cand_rx.recv() => { // Trickle ICE: the device sends none of its own and needs ours // on the signaling channel once the session ids are known. @@ -434,7 +461,7 @@ pub async fn run(token: String, mode: Mode, opts: CallOptions, log: Log) -> crat match v["data"]["type"].as_str() { Some("answer") => { let sdp = v["data"]["session_description"]["sdp"].as_str().unwrap_or_default().to_owned(); - let _ = std::fs::write(opts.out_dir.join("sdp-remote.txt"), &sdp); + save("sdp-remote.txt", &sdp); if let Err(e) = async { pc.set_remote_description(RTCSessionDescription::answer(sdp)?).await }.await { break format!("bad answer: {e}"); } diff --git a/src/i18n.rs b/src/i18n.rs new file mode 100644 index 0000000..78a3b1c --- /dev/null +++ b/src/i18n.rs @@ -0,0 +1,118 @@ +//! User-facing strings, English by default with Italian selectable. + +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum Lang { + #[default] + En, + It, +} + +impl Lang { + pub const ALL: [Lang; 2] = [Lang::En, Lang::It]; + + pub fn name(self) -> &'static str { + match self { + Lang::En => "English", + Lang::It => "Italiano", + } + } + + /// From `LC_ALL` / `LC_MESSAGES` / `LANG`. + pub fn from_env() -> Self { + let v = ["LC_ALL", "LC_MESSAGES", "LANG"] + .iter() + .find_map(|k| std::env::var(k).ok().filter(|v| !v.is_empty())) + .unwrap_or_default(); + if v.starts_with("it") { + Lang::It + } else { + Lang::En + } + } +} + +/// `(key, english, italian)`. +const TABLE: &[(&str, &str, &str)] = &[ + ("app.title", "BTicino EASYKIT", "BTicino EASYKIT"), + ("tab.home", "Home", "Home"), + ("tab.live", "Live", "Live"), + ("tab.events", "Calls", "Chiamate"), + ("tab.settings", "Settings", "Impostazioni"), + ("login.title", "Sign in with your Home + Security account", "Accedi con il tuo account Home + Security"), + ("login.email", "Email", "Email"), + ("login.password", "Password", "Password"), + ("login.button", "Sign in", "Accedi"), + ("login.note", "The password is not stored, only the session tokens.", "La password non viene salvata, solo i token di sessione."), + ("logout", "Sign out", "Esci"), + ("refresh", "Refresh", "Aggiorna"), + ("busy", "Working…", "In corso…"), + ("home.online", "Online", "Online"), + ("home.offline", "Offline", "Non raggiungibile"), + ("home.firmware", "Firmware", "Firmware"), + ("home.wifi", "Wi-Fi signal", "Segnale Wi-Fi"), + ("home.locks", "Doors and gates", "Porte e cancelli"), + ("home.open", "Open", "Apri"), + ("home.light", "Staircase light", "Luce scale"), + ("home.on", "On", "Accendi"), + ("home.off", "Off", "Spegni"), + ("confirm.open", "Open \"{}\" now?", "Aprire \"{}\" adesso?"), + ("confirm.yes", "Yes, open", "Sì, apri"), + ("confirm.no", "Cancel", "Annulla"), + ("opened", "Open command sent to \"{}\".", "Comando di apertura inviato a \"{}\"."), + ("live.start", "Start live view", "Avvia visione dal vivo"), + ("live.stop", "Stop", "Ferma"), + ("live.connecting", "Connecting…", "Connessione…"), + ("live.ended", "Ended: {}", "Terminata: {}"), + ("live.busy", "The intercom is busy (ringing or in a call).", "Il citofono è occupato (sta squillando o è in chiamata)."), + ("events.empty", "No calls yet.", "Nessuna chiamata."), + ("events.accepted", "Answered", "Risposta"), + ("events.missed", "Missed", "Persa"), + ("events.incoming", "Ringing", "Squillo"), + ("ring.title", "Someone is at the door", "Qualcuno ha suonato"), + ("settings.language", "Language", "Lingua"), + ("settings.autostart", "Start with the system", "Avvia all'accensione"), + ("settings.tray", "Keep running in the tray when closed", "Resta nell'area di notifica quando chiudi"), + ("settings.notify", "Desktop notification when someone rings", "Notifica sul desktop quando suonano"), + ("settings.account", "Account", "Account"), + ("tray.show", "Show", "Mostra"), + ("tray.quit", "Quit", "Esci"), + ("error", "Error: {}", "Errore: {}"), +]; + +/// Translated string; unknown keys come back unchanged. +pub fn t(lang: Lang, key: &'static str) -> &'static str { + TABLE + .iter() + .find(|(k, _, _)| *k == key) + .map(|(_, en, it)| if lang == Lang::It { *it } else { *en }) + .unwrap_or(key) +} + +/// [`t`] with the first `{}` replaced by `arg`. +pub fn tf(lang: Lang, key: &'static str, arg: &str) -> String { + t(lang, key).replacen("{}", arg, 1) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn every_key_is_translated_and_unique() { + let mut keys = std::collections::HashSet::new(); + for (k, en, it) in TABLE { + assert!(keys.insert(*k), "duplicate key {k}"); + assert!(!en.is_empty() && !it.is_empty(), "empty text for {k}"); + assert_eq!(en.matches("{}").count(), it.matches("{}").count(), "placeholder mismatch in {k}"); + } + } + + #[test] + fn formats_and_falls_back() { + assert_eq!(tf(Lang::It, "opened", "Cancello"), "Comando di apertura inviato a \"Cancello\"."); + assert_eq!(t(Lang::En, "no.such.key"), "no.such.key"); + } +} diff --git a/src/lib.rs b/src/lib.rs index 0b0d35e..0eac29e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,15 @@ //! Unofficial client library for the BTicino EASYKIT WiFi video door //! entry kit (and other BTicino intercoms on the Netatmo cloud). +pub mod actions; pub mod call; pub mod client; +pub mod i18n; pub mod model; pub mod protocol; pub mod push; +pub mod settings; +pub mod video; pub use client::{Client, Error, Result}; pub use model::{Home, Module, ModuleKind}; diff --git a/src/settings.rs b/src/settings.rs new file mode 100644 index 0000000..b36bd15 --- /dev/null +++ b/src/settings.rs @@ -0,0 +1,60 @@ +//! Application settings (`settings.toml`), separate from the device: the +//! intercom's own state is always read back from the cloud, so no device +//! profile has to be stored locally. + +use std::path::PathBuf; + +use serde::{Deserialize, Serialize}; + +use crate::client::config_dir; +use crate::i18n::Lang; + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct Settings { + pub lang: Lang, + pub autostart: bool, + pub tray: bool, + pub notify_on_ring: bool, +} + +impl Default for Settings { + fn default() -> Self { + Self { lang: Lang::from_env(), autostart: false, tray: true, notify_on_ring: true } + } +} + +impl Settings { + pub fn path() -> PathBuf { + config_dir().join("settings.toml") + } + + pub fn load() -> Self { + std::fs::read_to_string(Self::path()).ok().and_then(|s| toml::from_str(&s).ok()).unwrap_or_default() + } + + pub fn save(&self) -> std::io::Result<()> { + std::fs::create_dir_all(config_dir())?; + let s = toml::to_string_pretty(self).map_err(std::io::Error::other)?; + std::fs::write(Self::path(), s) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn missing_fields_use_defaults() { + let s: Settings = toml::from_str("lang = \"it\"").unwrap(); + assert_eq!(s.lang, Lang::It); + assert!(s.tray && s.notify_on_ring && !s.autostart); + } + + #[test] + fn roundtrip() { + let s = Settings { lang: Lang::En, autostart: true, tray: false, notify_on_ring: false }; + let back: Settings = toml::from_str(&toml::to_string(&s).unwrap()).unwrap(); + assert_eq!(s, back); + } +} diff --git a/src/video.rs b/src/video.rs new file mode 100644 index 0000000..64bae67 --- /dev/null +++ b/src/video.rs @@ -0,0 +1,76 @@ +//! H264 RTP → frames → RGBA, for showing the live view in a window. + +use bytes::{Bytes, BytesMut}; +use rtc::rtp::codec::h264::H264Packet; +use rtc::rtp::packetizer::Depacketizer; + +/// Rebuilds Annex-B access units from RTP payloads (single NAL, STAP-A, +/// FU-A), emitting one when the marker bit closes the frame. +#[derive(Default)] +pub struct FrameAssembler { + depack: H264Packet, + frame: BytesMut, +} + +impl FrameAssembler { + pub fn push(&mut self, payload: &Bytes, marker: bool) -> Option { + if let Ok(nal) = self.depack.depacketize(payload) { + self.frame.extend_from_slice(&nal); + } + if marker && !self.frame.is_empty() { + return Some(self.frame.split().freeze()); + } + None + } +} + +/// One decoded picture. +pub struct RgbaFrame { + pub width: usize, + pub height: usize, + pub rgba: Vec, +} + +#[cfg(feature = "gui")] +pub struct Decoder(openh264::decoder::Decoder); + +#[cfg(feature = "gui")] +impl Decoder { + pub fn new() -> Result { + openh264::decoder::Decoder::new().map(Self).map_err(|e| e.to_string()) + } + + /// Decodes one access unit; `None` until a picture is complete. + pub fn decode(&mut self, annexb: &[u8]) -> Option { + use openh264::formats::YUVSource; + let yuv = self.0.decode(annexb).ok()??; + let (width, height) = yuv.dimensions(); + let mut rgba = vec![0; width * height * 4]; + yuv.write_rgba8(&mut rgba); + Some(RgbaFrame { width, height, rgba }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn single_nal_frame_is_emitted_on_marker() { + let mut a = FrameAssembler::default(); + // SPS (type 7) then a slice (type 1) closing the frame. + assert!(a.push(&Bytes::from_static(&[0x67, 0x42, 0x00, 0x1e]), false).is_none()); + let f = a.push(&Bytes::from_static(&[0x41, 0x9a, 0x02, 0x03]), true).unwrap(); + assert_eq!(&f[..], &[0, 0, 0, 1, 0x67, 0x42, 0x00, 0x1e, 0, 0, 0, 1, 0x41, 0x9a, 0x02, 0x03]); + assert!(a.push(&Bytes::from_static(&[0x41, 0x9a, 0x02, 0x03]), false).is_none()); + } + + #[test] + fn fu_a_fragments_are_joined() { + let mut a = FrameAssembler::default(); + // FU indicator 0x7c (type 28, NRI 3), FU headers: start / end, NAL type 5. + assert!(a.push(&Bytes::from_static(&[0x7c, 0x85, 0xaa, 0xbb]), false).is_none()); + let f = a.push(&Bytes::from_static(&[0x7c, 0x45, 0xcc]), true).unwrap(); + assert_eq!(&f[..], &[0, 0, 0, 1, 0x65, 0xaa, 0xbb, 0xcc]); + } +} From 2d1ab5baa504eee6042a2f3bfa3fc00b5c28ae01 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:54:25 +0200 Subject: [PATCH 11/17] examples: headless worker live-view decode check Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 4 ++++ examples/worker_live.rs | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 examples/worker_live.rs diff --git a/Cargo.toml b/Cargo.toml index 118b05b..3e2e294 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,10 @@ tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } toml = "0.8" webrtc = "0.21" +[[example]] +name = "worker_live" +required-features = ["gui"] + [features] default = ["gui"] # Desktop app (egui) and H264 decoding; `--no-default-features` builds the CLI only. diff --git a/examples/worker_live.rs b/examples/worker_live.rs new file mode 100644 index 0000000..0db863c --- /dev/null +++ b/examples/worker_live.rs @@ -0,0 +1,44 @@ +//! Headless check of the GUI pipeline: Worker -> live view -> decoded frames. +//! Saves the last frame to `$1` (PNG) when built with the `gui` feature. +use bticino_easykit::actions::{Command, Update, Worker}; +use std::time::{Duration, Instant}; + +fn main() { + let out = std::env::args().nth(1); + let w = Worker::spawn(|| {}); + let mut started = false; + let mut frames = 0u32; + let mut last = None; + let t0 = Instant::now(); + while t0.elapsed() < Duration::from_secs(45) { + match w.rx.recv_timeout(Duration::from_millis(500)) { + Ok(Update::Home(h, _)) if !started => { + println!("home {} loaded, starting live view", h.name); + started = true; + w.send(Command::StartLive); + } + Ok(Update::LiveState(s)) => println!("live: {s}"), + Ok(Update::Frame(f)) => { + frames += 1; + if frames == 1 { + println!("first frame {}x{} after {:?}", f.width, f.height, t0.elapsed()); + } + if frames == 150 { + w.send(Command::StopLive); + } + last = Some(f); + } + Ok(Update::LiveEnded(r)) => { + println!("ended: {:?}", r.map(|r| r.ended_by)); + break; + } + Ok(Update::Error(e)) => println!("error: {e}"), + _ => {} + } + } + println!("decoded frames: {frames}"); + if let (Some(p), Some(f)) = (out, last) { + image::save_buffer(&p, &f.rgba, f.width as u32, f.height as u32, image::ColorType::Rgba8).unwrap(); + println!("saved {p}"); + } +} From 5d426c9ac50316e135ed6e6b3a7d7ea059afb346 Mon Sep 17 00:00:00 2001 From: deddroid Date: Wed, 21 Oct 2026 18:57:52 +0200 Subject: [PATCH 12/17] Two-way audio: Opus (pure Rust) to speakers, push-to-talk microphone; mute Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 22 +++ Cargo.toml | 4 +- src/actions.rs | 62 ++++++++- src/audio.rs | 296 +++++++++++++++++++++++++++++++++++++++++ src/bin/cli.rs | 2 + src/bin/cli/session.rs | 2 + src/bin/gui/app.rs | 23 ++++ src/call.rs | 23 +++- src/i18n.rs | 2 + src/lib.rs | 2 + 10 files changed, 430 insertions(+), 8 deletions(-) create mode 100644 src/audio.rs diff --git a/Cargo.lock b/Cargo.lock index 80e2cd8..34f0051 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,6 +763,7 @@ dependencies = [ "base64 0.22.1", "bytes", "clap", + "cpal", "dirs 5.0.1", "eframe", "env_logger", @@ -783,6 +784,7 @@ dependencies = [ "tokio-tungstenite", "toml", "tray-icon", + "unsafe-libopus", "webrtc", "windows-sys 0.61.2", "winreg 0.56.0", @@ -3730,6 +3732,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.2.2" @@ -6939,6 +6950,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libopus" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c757408e7256c910343c7b215c8c8b878948630eecc774baabcca0972376eb73" +dependencies = [ + "arrayref", + "num-complex", + "num-traits", +] + [[package]] name = "untrusted" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index 3e2e294..ddd77c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ async-trait = "0.1" base64 = "0.22" bytes = "1" clap = { version = "4", features = ["derive"] } +cpal = { version = "0.16", optional = true } dirs = "5" eframe = { version = "0.37", optional = true } env_logger = "0.11" @@ -46,6 +47,7 @@ thiserror = "2" tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] } tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } toml = "0.8" +unsafe-libopus = { version = "0.2", optional = true } webrtc = "0.21" [[example]] @@ -55,7 +57,7 @@ required-features = ["gui"] [features] default = ["gui"] # Desktop app (egui) and H264 decoding; `--no-default-features` builds the CLI only. -gui = ["dep:openh264", "dep:eframe", "dep:image", "dep:notify-rust", "dep:ksni", "dep:tray-icon", "dep:windows-sys", "dep:winreg"] +gui = ["dep:openh264", "dep:cpal", "dep:unsafe-libopus", "dep:eframe", "dep:image", "dep:notify-rust", "dep:ksni", "dep:tray-icon", "dep:windows-sys", "dep:winreg"] [target.'cfg(target_os = "linux")'.dependencies] ksni = { version = "0.3", default-features = false, features = ["tokio"], optional = true } diff --git a/src/actions.rs b/src/actions.rs index fc1e999..fa01601 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -65,6 +65,10 @@ pub enum Command { Light(String, bool), StartLive, StopLive, + /// Mute the external unit's audio on the speakers. + Mute(bool), + /// Push-to-talk: send the microphone instead of silence. + Talk(bool), } pub enum Update { @@ -129,6 +133,8 @@ fn run(rx: Receiver, out: Sender, wake: Arc = None; let mut live_stop: Option> = None; + #[cfg(feature = "gui")] + let mut audio: Option> = None; let mut watching = false; ctx.send(Update::LoggedIn(client.is_logged_in())); @@ -189,12 +195,39 @@ fn run(rx: Receiver, out: Sender, wake: Arc { if let Some(s) = live_stop.take() { s.notify_one(); } + #[cfg(feature = "gui")] + if let Some(a) = audio.take() { + a.stop(); + } + } + Command::Mute(_m) => { + #[cfg(feature = "gui")] + if let Some(a) = &audio { + a.muted.store(_m, std::sync::atomic::Ordering::Relaxed); + } + } + Command::Talk(_t) => { + #[cfg(feature = "gui")] + if let Some(a) = &audio { + a.talking.store(_t, std::sync::atomic::Ordering::Relaxed); + } } } Ok(()) @@ -234,6 +267,8 @@ fn start_live( mode: Mode, ice: Vec, stop: Arc, + #[cfg(feature = "gui")] audio: Option>, + #[cfg(not(feature = "gui"))] audio: Option<()>, ctx: Arc, ) { #[cfg(feature = "gui")] @@ -259,6 +294,25 @@ fn start_live( #[cfg(not(feature = "gui"))] let on_video = None; + #[cfg(feature = "gui")] + let audio_end = audio.clone(); + #[cfg(feature = "gui")] + let (on_audio, mic) = match audio { + Some(a) => { + let (play, talk) = (a.clone(), a); + ( + Some(Arc::new(move |b: &bytes::Bytes| play.play(b)) as call::AudioSink), + Some(Arc::new(move || talk.next_mic_frame()) as call::MicSource), + ) + } + None => (None, None), + }; + #[cfg(not(feature = "gui"))] + let (on_audio, mic) = { + let _ = audio; + (None, None) + }; + let lctx = ctx.clone(); let log: call::Log = Arc::new(move |_src, v| { if let Some(s) = v["connection_state"].as_str() { @@ -270,11 +324,17 @@ fn start_live( max_duration: Duration::from_secs(10 * 60), ice_servers: ice, on_video, + on_audio, + mic, stop: Some(stop), }; ctx.send(Update::LiveState("starting".into())); rt.spawn(async move { let r = call::run(token, mode, opts, log).await.map_err(|e| e.to_string()); + #[cfg(feature = "gui")] + if let Some(a) = audio_end { + a.stop(); + } ctx.send(Update::LiveEnded(r)); }); } diff --git a/src/audio.rs b/src/audio.rs new file mode 100644 index 0000000..534d108 --- /dev/null +++ b/src/audio.rs @@ -0,0 +1,296 @@ +//! Two-way audio: Opus (pure-Rust libopus) ⇄ speakers / microphone (cpal). + +use std::collections::VecDeque; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Arc, Mutex}; + +/// Linear resampler for mono `f32` audio, keeping state between chunks. +pub struct Resampler { + from: f64, + to: f64, + pos: f64, + last: f32, +} + +impl Resampler { + pub fn new(from: u32, to: u32) -> Self { + Self { from: from as f64, to: to as f64, pos: 0.0, last: 0.0 } + } + + pub fn process(&mut self, input: &[f32], out: &mut Vec) { + if self.from == self.to { + out.extend_from_slice(input); + return; + } + let step = self.from / self.to; + // `pos` indexes into [last, input...]; index 0 is the previous chunk's tail. + let len = input.len() as f64; + while self.pos < len { + let i = self.pos.floor() as usize; + let frac = (self.pos - i as f64) as f32; + let a = if i == 0 { self.last } else { input[i - 1] }; + let b = input[i.min(input.len() - 1)]; + out.push(a + (b - a) * frac); + self.pos += step; + } + self.pos -= len; + if let Some(&l) = input.last() { + self.last = l; + } + } +} + +pub const RATE: u32 = 48_000; +/// 20 ms at 48 kHz. +pub const FRAME: usize = 960; + +pub struct OpusDecoder(*mut unsafe_libopus::OpusDecoder); +// The decoder is only ever used from one thread at a time. +unsafe impl Send for OpusDecoder {} + +impl OpusDecoder { + pub fn new() -> Option { + let mut err = 0; + let p = unsafe { unsafe_libopus::opus_decoder_create(RATE as i32, 2, &mut err) }; + (!p.is_null() && err == 0).then_some(Self(p)) + } + + /// Decodes one packet to interleaved stereo `i16`. + pub fn decode(&mut self, packet: &[u8]) -> Vec { + let mut pcm = vec![0i16; 5760 * 2]; + let n = unsafe { unsafe_libopus::opus_decode(self.0, packet.as_ptr(), packet.len() as i32, pcm.as_mut_ptr(), 5760, 0) }; + pcm.truncate(n.max(0) as usize * 2); + pcm + } +} + +impl Drop for OpusDecoder { + fn drop(&mut self) { + unsafe { unsafe_libopus::opus_decoder_destroy(self.0) } + } +} + +pub struct OpusEncoder(*mut unsafe_libopus::OpusEncoder); +unsafe impl Send for OpusEncoder {} + +impl OpusEncoder { + pub fn new() -> Option { + let mut err = 0; + let p = unsafe { unsafe_libopus::opus_encoder_create(RATE as i32, 2, unsafe_libopus::OPUS_APPLICATION_VOIP, &mut err) }; + (!p.is_null() && err == 0).then_some(Self(p)) + } + + /// Encodes one 20 ms interleaved stereo frame (`FRAME * 2` samples). + pub fn encode(&mut self, pcm: &[i16]) -> Vec { + let mut out = vec![0u8; 1500]; + let n = unsafe { unsafe_libopus::opus_encode(self.0, pcm.as_ptr(), FRAME as i32, out.as_mut_ptr(), out.len() as i32) }; + out.truncate(n.max(0) as usize); + out + } +} + +impl Drop for OpusEncoder { + fn drop(&mut self) { + unsafe { unsafe_libopus::opus_encoder_destroy(self.0) } + } +} + +type Buffer = Arc>>; + +/// Plays the external unit and captures the microphone for one call. +/// cpal streams are not `Send` everywhere, so they live on their own thread. +pub struct Audio { + speaker: Buffer, + mic: Buffer, + pub muted: Arc, + pub talking: Arc, + stop: Arc, + decoder: Mutex>, + encoder: Mutex>, + out_rate: Arc>, +} + +impl Audio { + pub fn start() -> Arc { + let a = Arc::new(Self { + speaker: Arc::default(), + mic: Arc::default(), + muted: Arc::new(AtomicBool::new(false)), + talking: Arc::new(AtomicBool::new(false)), + stop: Arc::new(AtomicBool::new(false)), + decoder: Mutex::new(OpusDecoder::new()), + encoder: Mutex::new(OpusEncoder::new()), + out_rate: Arc::new(Mutex::new(RATE)), + }); + let t = a.clone(); + std::thread::Builder::new() + .name("easykit-audio".into()) + .spawn(move || { + let streams = open_streams(&t); + if let Err(e) = &streams { + log::warn!("audio unavailable: {e}"); + } + while !t.stop.load(Ordering::Relaxed) { + std::thread::sleep(std::time::Duration::from_millis(100)); + } + drop(streams); + }) + .ok(); + a + } + + pub fn stop(&self) { + self.stop.store(true, Ordering::Relaxed); + } + + /// Opus payload from the external unit → speakers. + pub fn play(&self, payload: &[u8]) { + if self.muted.load(Ordering::Relaxed) { + return; + } + let Some(pcm) = self.decoder.lock().unwrap().as_mut().map(|d| d.decode(payload)) else { return }; + let mono: Vec = pcm.chunks_exact(2).map(|s| (s[0] as f32 + s[1] as f32) / 65536.0).collect(); + let rate = *self.out_rate.lock().unwrap(); + let mut out = Vec::with_capacity(mono.len() * rate as usize / RATE as usize + 1); + Resampler::new(RATE, rate).process(&mono, &mut out); + let mut buf = self.speaker.lock().unwrap(); + // Keep latency bounded (~300 ms). + let cap = rate as usize * 3 / 10; + buf.extend(out); + let excess = buf.len().saturating_sub(cap); + buf.drain(..excess); + } + + /// Next 20 ms Opus frame from the microphone while talking, else `None` + /// (the caller then sends silence). + pub fn next_mic_frame(&self) -> Option> { + let mut buf = self.mic.lock().unwrap(); + if !self.talking.load(Ordering::Relaxed) { + buf.clear(); + return None; + } + if buf.len() < FRAME { + return None; + } + let pcm: Vec = + buf.drain(..FRAME).flat_map(|s| { let v = (s.clamp(-1.0, 1.0) * 32767.0) as i16; [v, v] }).collect(); + drop(buf); + self.encoder.lock().unwrap().as_mut().map(|e| e.encode(&pcm)) + } +} + +impl Drop for Audio { + fn drop(&mut self) { + self.stop(); + } +} + +fn open_streams(a: &Arc