From 71fcc8efd39cb700cbaa7fa882115e997505121d Mon Sep 17 00:00:00 2001 From: Miles Frankel Date: Mon, 15 Apr 2024 16:35:07 -0400 Subject: [PATCH] fix macos mdns issue --- Cargo.lock | 11 +++++++++++ Cargo.toml | 2 +- forwarder/Cargo.toml | 6 ++++++ receiver/src/bot.rs | 1 - 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53c1574..2bc1c69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -706,6 +706,16 @@ dependencies = [ "pnet_macros_support", ] +[[package]] +name = "dns-sd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d748509dea20228f63ba519bf142ce2593396386125b01f5b0d6412dab972087" +dependencies = [ + "libc", + "pkg-config", +] + [[package]] name = "either" version = "1.8.1" @@ -1490,6 +1500,7 @@ checksum = "2aa877d18f6150364012cb4be5682d62d7c712c88bae2d0d01720fd7c15e2f06" dependencies = [ "aes-ctr", "base64 0.13.1", + "dns-sd", "form_urlencoded", "futures-core", "hmac", diff --git a/Cargo.toml b/Cargo.toml index 4c9b551..77a8787 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] - +resolver = "2" members = ["forwarder", "receiver", "player", "protocol", "common"] diff --git a/forwarder/Cargo.toml b/forwarder/Cargo.toml index 012b22a..6dd9ae1 100644 --- a/forwarder/Cargo.toml +++ b/forwarder/Cargo.toml @@ -24,3 +24,9 @@ rand = "0.8.5" protocol = { path = "../protocol" } common = { path = "../common" } once_cell = "1.17.2" + +# enable this feature on macos so we don't bork the built-in mdns stuff +[target.'cfg(target_os = "macos")'.dependencies] +librespot = { version = "0.4.2", default_features = false, features = [ + "with-dns-sd", +] } diff --git a/receiver/src/bot.rs b/receiver/src/bot.rs index 9cc786f..86f3bf0 100644 --- a/receiver/src/bot.rs +++ b/receiver/src/bot.rs @@ -15,7 +15,6 @@ use crate::creds_registry::CredsRegistry; #[derive(Debug, Parser, Clone)] pub struct BotOptions { #[clap( - short, long, env, default_value = "player",