Fix compiling by features

This commit is contained in:
Jackson Coxson
2025-02-25 21:16:42 -07:00
parent 44142dbdbe
commit 1fd55f6317
4 changed files with 13 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ core_device_proxy = ["dep:serde_json", "dep:json", "dep:byteorder"]
heartbeat = [] heartbeat = []
installation_proxy = [] installation_proxy = []
mounter = ["dep:sha2"] mounter = ["dep:sha2"]
usbmuxd = [] usbmuxd = ["tokio/net"]
tcp = ["tokio/net"] tcp = ["tokio/net"]
tss = ["dep:uuid", "dep:reqwest"] tss = ["dep:uuid", "dep:reqwest"]
tunneld = ["dep:serde_json", "dep:json", "dep:reqwest"] tunneld = ["dep:serde_json", "dep:json", "dep:reqwest"]
@@ -50,6 +50,7 @@ xpc = [
"dep:uuid", "dep:uuid",
"dep:async-recursion", "dep:async-recursion",
"dep:base64", "dep:base64",
"dep:json",
] ]
full = [ full = [
"core_device_proxy", "core_device_proxy",

View File

@@ -283,7 +283,7 @@ pub enum IdeviceError {
#[error("image not mounted")] #[error("image not mounted")]
ImageNotMounted, ImageNotMounted,
#[cfg(feature = "tss")] #[cfg(any(feature = "tss", feature = "tunneld"))]
#[error("http reqwest error")] #[error("http reqwest error")]
Reqwest(#[from] reqwest::Error), Reqwest(#[from] reqwest::Error),

View File

@@ -3,7 +3,10 @@
use log::debug; use log::debug;
use openssl::sha::Sha384; use openssl::sha::Sha384;
use crate::{lockdownd::LockdowndClient, tss::TSSRequest, Idevice, IdeviceError, IdeviceService}; use crate::{lockdownd::LockdowndClient, Idevice, IdeviceError, IdeviceService};
#[cfg(feature = "tss")]
use crate::tss::TSSRequest;
/// Manages mounted images on the idevice. /// Manages mounted images on the idevice.
/// NOTE: A lockdown client must be established and queried after establishing a mounter client, or /// NOTE: A lockdown client must be established and queried after establishing a mounter client, or
@@ -318,6 +321,7 @@ impl ImageMounter {
Ok(()) Ok(())
} }
#[cfg(feature = "tss")]
pub async fn mount_personalized( pub async fn mount_personalized(
&mut self, &mut self,
provider: &dyn crate::provider::IdeviceProvider, provider: &dyn crate::provider::IdeviceProvider,
@@ -340,6 +344,7 @@ impl ImageMounter {
.await .await
} }
#[cfg(feature = "tss")]
/// Calling this has the potential of closing the socket, /// Calling this has the potential of closing the socket,
/// so a provider is required for this abstraction. /// so a provider is required for this abstraction.
#[allow(clippy::too_many_arguments)] // literally nobody asked #[allow(clippy::too_many_arguments)] // literally nobody asked

4
justfile Normal file
View File

@@ -0,0 +1,4 @@
check-features:
cd idevice
cargo hack check --feature-powerset --no-dev-deps
cd ..