From 6ed3f96155223e87c4561044364f0dfdfef6694f Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Fri, 27 Feb 2026 00:12:38 +0100 Subject: [PATCH] [refactor](trx-server): access soapysdr through trx-backend facade Remove direct dependency on trx-backend-soapysdr from server Cargo.toml. Re-export SoapySdrRig from trx-backend instead so server accesses it through the proper facade. This keeps sub-backends internal to trx-backend and maintains proper module organization. Co-Authored-By: Claude Opus 4.6 --- Cargo.lock | 1 - src/trx-server/Cargo.toml | 1 - src/trx-server/src/main.rs | 2 +- src/trx-server/trx-backend/src/lib.rs | 2 ++ 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 103ee7f..826ef72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2525,7 +2525,6 @@ dependencies = [ "trx-app", "trx-aprs", "trx-backend", - "trx-backend-soapysdr", "trx-core", "trx-cw", "trx-decode-log", diff --git a/src/trx-server/Cargo.toml b/src/trx-server/Cargo.toml index d8663f7..f83714d 100644 --- a/src/trx-server/Cargo.toml +++ b/src/trx-server/Cargo.toml @@ -27,7 +27,6 @@ cpal = "0.15" opus = "0.3" trx-app = { path = "../trx-app" } trx-backend = { path = "trx-backend", features = ["soapysdr"] } -trx-backend-soapysdr = { path = "trx-backend/trx-backend-soapysdr" } trx-core = { path = "../trx-core" } trx-aprs = { path = "../decoders/trx-aprs" } trx-cw = { path = "../decoders/trx-cw" } diff --git a/src/trx-server/src/main.rs b/src/trx-server/src/main.rs index 8adc2e5..3d94624 100644 --- a/src/trx-server/src/main.rs +++ b/src/trx-server/src/main.rs @@ -278,7 +278,7 @@ fn build_sdr_rig_from_instance( }) .collect(); - let sdr_rig = trx_backend_soapysdr::SoapySdrRig::new_with_config( + let sdr_rig = trx_backend::SoapySdrRig::new_with_config( args, &channels, &rig_cfg.sdr.gain.mode, diff --git a/src/trx-server/trx-backend/src/lib.rs b/src/trx-server/trx-backend/src/lib.rs index 2828dd4..cdfcdf5 100644 --- a/src/trx-server/trx-backend/src/lib.rs +++ b/src/trx-server/trx-backend/src/lib.rs @@ -13,6 +13,8 @@ mod dummy; use trx_backend_ft450d::Ft450d; #[cfg(feature = "ft817")] use trx_backend_ft817::Ft817; +#[cfg(feature = "soapysdr")] +pub use trx_backend_soapysdr::SoapySdrRig; /// Connection details for instantiating a rig backend. #[derive(Debug, Clone)]