Skip to content

Build without idevice when the install feature is off - #33

Open
FrizzleM wants to merge 1 commit into
nab138:mainfrom
FrizzleM:gate-idevice-behind-install
Open

FrizzleM wants to merge 1 commit into
nab138:mainfrom
FrizzleM:gate-idevice-behind-install

Conversation

@FrizzleM

@FrizzleM FrizzleM commented Nov 9, 2026

Copy link
Copy Markdown

install = ["dep:idevice"] reads as the feature that brings in idevice, but a few uses sit outside it, so a build with install off fails:

$ cargo check -p isideload --no-default-features --features tokio-mt,fs-storage
error: could not compile `isideload` (lib) due to 53 previous errors

Two causes:

  • use idevice::IdeviceError and SideloadError::IdeviceError (lib.rs), pub mod device (util/mod.rs) and the IdeviceInfo, IdeviceProvider and DevicesApi imports in sideloader.rs are only used by install_app. They are now behind #[cfg(feature = "install")], like sideload::install already is, and delete_app_after_install gets allow(dead_code) when install is off.
  • serde's derive feature only reached isideload through idevice, so Cargo.toml now asks for it.

A wasm build without install also stops warning about those imports and the unread field.

SideInstaller only calls sign_app and installs through idevice-ffi, so having to turn install on meant compiling a second idevice that nothing called.

Checked on macOS:

  • --no-default-features --features tokio-mt,fs-storage builds, and cargo tree -i idevice finds no idevice
  • --features install,tokio-mt,fs-storage, the default features, cargo check --workspace --all-targets and cargo build -p minimal build
  • --features wasm,fs-storage --target wasm32-unknown-unknown builds, with and without install

Not in this PR: wasm = ["idevice/wasm", …] still turns idevice on by itself. idevice?/wasm would leave it off unless install is on too, if that's what you want.

Made with Claude Code.

🤖 Generated with Claude Code

`install = ["dep:idevice"]` is meant to be what pulls in idevice, but a few
uses sat outside it, so `--no-default-features` without `install` failed to
compile:

- `use idevice::IdeviceError` and the `SideloadError::IdeviceError` variant
  in lib.rs
- `pub mod device` in util/mod.rs (lockdown-based `IdeviceInfo`)
- the `IdeviceInfo`, `IdeviceProvider` and `DevicesApi` imports in
  sideloader.rs

All of them only serve `install_app`, so they now sit behind
`#[cfg(feature = "install")]`, like `sideload::install` already does.
`delete_app_after_install` is only read by `install_app` and gets
`allow(dead_code)` when `install` is off.

Turning `install` off also showed that serde's `derive` feature only reached
isideload through idevice, so Cargo.toml now asks for it.

A `wasm` build without `install` no longer warns about those unused imports
and the unread field either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant