From eda8c4467e3f0ade52b16725fe40bd0007811e7b Mon Sep 17 00:00:00 2001 From: restitux Date: Sun, 4 Jan 2026 19:17:08 -0700 Subject: [PATCH] enable rfd only on supported platforms --- gui/Cargo.toml | 7 ++++++- gui/src/app.rs | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gui/Cargo.toml b/gui/Cargo.toml index a7337ee..1560368 100644 --- a/gui/Cargo.toml +++ b/gui/Cargo.toml @@ -88,13 +88,18 @@ tracing = "^0.1.40" color-eyre = "^0.6.3" crossbeam-queue = "^0.3.11" lol_html = "^2.2.0" -rfd = { git = "https://github.com/PolyMeilex/rfd.git", version = "^0.16.0", default-features = false } base64 = "^0.22" mime_guess = "^2.0.5" async_cell = "^0.2.3" reqwest = { version = "^0.12.22", features = ["json"] } dioxus-asset-resolver = "0.7.2" +# Platform Integration +# ==================== +# rfd only supports windows, macos, linux, and wasm32. No support for Android or iOS +[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "macos", target_arch = "wasm32"))'.dependencies] +rfd = { git = "https://github.com/PolyMeilex/rfd.git", version = "^0.16.0", default-features = false } + # Denoising # ========= deep_filter = { git = "https://github.com/Rikorose/DeepFilterNet.git", rev = "d375b2d8309e0935d165700c91da9de862a99c31", features = [ diff --git a/gui/src/app.rs b/gui/src/app.rs index cca6638..70fce42 100644 --- a/gui/src/app.rs +++ b/gui/src/app.rs @@ -210,6 +210,12 @@ pub fn Channel(id: ChannelId) -> Element { ) } +#[cfg(any( + target_os = "windows", + target_os = "macos", + target_os = "linux", + target_arch = "wasm32", +))] pub fn pick_and_send_file(net: &Coroutine) { let channels = if let Some(user) = STATE.server.read().this_user() { vec![user.channel] @@ -231,6 +237,13 @@ pub fn pick_and_send_file(net: &Coroutine) { }); }); } +#[cfg(not(any( + target_os = "windows", + target_os = "macos", + target_os = "linux", + target_arch = "wasm32", +)))] +pub fn pick_and_send_file(net: &Coroutine) {} #[component] pub fn ChatView() -> Element {