From 4fe9f8c418e4bf4e73f53bef5b6cab5dc262fe6d Mon Sep 17 00:00:00 2001 From: argenis de la rosa Date: Tue, 10 Mar 2026 08:23:56 -0400 Subject: [PATCH] fix(build): clean remaining validation issues Convert peripheral tool collections into Arc-backed tools so all-features builds compile cleanly. Gate the Landlock Path import behind the Linux sandbox cfg to remove the remaining warning during validation. --- src/peripherals/mod.rs | 9 +++++++-- src/security/landlock.rs | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/peripherals/mod.rs b/src/peripherals/mod.rs index 29cce3b27..839cbad5a 100644 --- a/src/peripherals/mod.rs +++ b/src/peripherals/mod.rs @@ -163,7 +163,12 @@ pub async fn create_peripheral_tools(config: &PeripheralsConfig) -> Result { - tools.extend(peripheral.tools()); + tools.extend( + peripheral + .tools() + .into_iter() + .map(|tool| Arc::::from(tool)), + ); tracing::info!(board = %board.board, "RPi GPIO peripheral connected"); } Err(e) => { @@ -189,7 +194,7 @@ pub async fn create_peripheral_tools(config: &PeripheralsConfig) -> Result::from)); if board.board == "arduino-uno" { if let Some(ref path) = board.path { tools.push(Arc::new(arduino_upload::ArduinoUploadTool::new( diff --git a/src/security/landlock.rs b/src/security/landlock.rs index eef21db73..3605b6f7a 100644 --- a/src/security/landlock.rs +++ b/src/security/landlock.rs @@ -7,6 +7,7 @@ use landlock::{AccessFs, PathBeneath, PathFd, Ruleset, RulesetAttr, RulesetCreatedAttr}; use crate::security::traits::Sandbox; +#[cfg(all(feature = "sandbox-landlock", target_os = "linux"))] use std::path::Path; /// Landlock sandbox backend for Linux