Skip to content

Commit 2f1208c

Browse files
committed
linux-rust: bump dependencies and clean up media_controller
1 parent a0cdbb2 commit 2f1208c

File tree

10 files changed

+2143
-2343
lines changed

10 files changed

+2143
-2343
lines changed

linux-rust/Cargo.lock

Lines changed: 1723 additions & 1532 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

linux-rust/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
tokio = {version = "1.47.1", features = ["full"]}
7+
tokio = {version = "1.50.0", features = ["full"]}
88
bluer = { version = "0.17.4", features = ["full"] }
9-
env_logger = {version = "0.11.8", features = ["auto-color"]}
10-
uuid = "1.18.1"
11-
log = "0.4.28"
12-
dbus = "0.9.9"
9+
env_logger = {version = "0.11.10", features = ["auto-color"]}
10+
uuid = "1.23.0"
11+
log = "0.4.29"
12+
dbus = "0.9.10"
1313
hex = "0.4.3"
14-
iced = { version = "0.13.1", features = ["tokio", "image"] }
14+
iced = { version = "0.14.0", features = ["tokio", "image"] }
1515
libpulse-binding = "2.30.1"
1616
ksni = "0.3.1"
1717
image = "0.25.8"
18-
imageproc = "0.25.0"
18+
imageproc = "0.26.1"
1919
ab_glyph = "0.2.32"
20-
clap = { version = "4.5.50", features = ["derive"] }
20+
clap = { version = "4.6.0", features = ["derive"] }
2121
serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
23-
aes = "0.8.4"
24-
futures = "0.3.31"
23+
aes = "0.9.0-rc.4"
24+
futures = "0.3.32"
2525

2626
[profile.release]
2727
opt-level = "s"

linux-rust/src/bluetooth/le.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use crate::devices::enums::{DeviceData, DeviceInformation, DeviceType};
33
use crate::ui::tray::MyTray;
44
use crate::utils::{ah, get_devices_path, get_preferences_path};
55
use aes::Aes128;
6-
use aes::cipher::generic_array::GenericArray;
7-
use aes::cipher::{BlockDecrypt, KeyInit};
6+
use aes::cipher::Array;
7+
use aes::cipher::{BlockCipherDecrypt, KeyInit};
88
use bluer::monitor::{Monitor, MonitorEvent, Pattern};
99
use bluer::{Address, Session};
1010
use futures::StreamExt;
@@ -17,8 +17,8 @@ use std::sync::Arc;
1717
use tokio::sync::Mutex;
1818

1919
fn decrypt(key: &[u8; 16], data: &[u8; 16]) -> [u8; 16] {
20-
let cipher = Aes128::new(&GenericArray::from(*key));
21-
let mut block = GenericArray::from(*data);
20+
let cipher = Aes128::new(&Array::from(*key));
21+
let mut block = Array::from(*data);
2222
cipher.decrypt_block(&mut block);
2323
block.into()
2424
}

linux-rust/src/devices/airpods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ impl AirPodsDevice {
5555
error!("Failed to send handshake to AirPods device: {}", e);
5656
}
5757

58-
sleep(Duration::from_millis(100)).await;
58+
sleep(Duration::from_millis(300)).await;
5959

6060
info!("Setting feature flags");
6161
if let Err(e) = aacp_manager.send_set_feature_flags_packet().await {
6262
error!("Failed to set feature flags: {}", e);
6363
}
6464

65-
sleep(Duration::from_millis(100)).await;
65+
sleep(Duration::from_millis(300)).await;
6666

6767
info!("Requesting notifications");
6868
if let Err(e) = aacp_manager.send_notification_request().await {

linux-rust/src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use ksni::TrayMethods;
2222
use log::{info, warn};
2323
use std::collections::HashMap;
2424
use std::env;
25-
use std::sync::atomic::{AtomicBool, Ordering};
25+
use std::sync::atomic::{AtomicBool};
2626
use std::sync::Arc;
2727
use tokio::sync::RwLock;
2828
use tokio::sync::mpsc::unbounded_channel;
@@ -64,18 +64,18 @@ fn main() -> iced::Result {
6464
}
6565

6666
let log_level = if args.debug { "debug" } else { "info" };
67-
let wayland_display = env::var("WAYLAND_DISPLAY").is_ok();
68-
if wayland_display && env::var("WGPU_BACKEND").is_err() {
69-
unsafe { env::set_var("WGPU_BACKEND", "gl") };
70-
}
67+
// let wayland_display = env::var("WAYLAND_DISPLAY").is_ok();
68+
// if wayland_display && env::var("WGPU_BACKEND").is_err() {
69+
// unsafe { env::set_var("WGPU_BACKEND", "gl") };
70+
// }
7171
if env::var("RUST_LOG").is_err() {
7272
unsafe {
7373
env::set_var(
7474
"RUST_LOG",
7575
log_level.to_owned()
7676
+ &format!(
77-
",winit=warn,tracing=warn,iced_wgpu=warn,wgpu_hal=warn,wgpu_core=warn,cosmic_text=warn,naga=warn,iced_winit=warn,librepods_rust::bluetooth::le={}",
78-
if args.le_debug { "debug" } else { "warn" }
77+
",zbus=warn,winit=warn,tracing=warn,iced_wgpu=warn,wgpu_hal=warn,wgpu_core=warn,cosmic_text=warn,naga=warn,iced_winit=warn,librepods::bluetooth::le={}",
78+
if args.le_debug { "debug" } else { "info" }
7979
),
8080
)
8181
};

0 commit comments

Comments
 (0)