-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Milestone
Description
Description
Prepare the Rust backend to compile for mobile targets (aarch64-apple-ios, aarch64-linux-android) by gating desktop-only code behind feature flags.
Scope:
- Add
desktopandmobilefeature flags tosrc-tauri/Cargo.toml - Gate desktop-only services behind
#[cfg(feature = "desktop")]:services/device.rsβ USB detection (sysinfo, diskutil)services/export/β Pioneer PDB/ANLZ generationservices/sync.rsβ USB device syncservices/audio/β rodio playbackservices/media_controls.rsβ souvlakiservices/analysis.rsβ audio analysis (symphonia + stratum-dsp)services/library.rsβ file import/metadata extraction (lofty)
- Gate desktop-only dependencies:
rodio,souvlaki,raw-window-handle,sysinfoβdesktopfeature onlylofty,walkdir,stratum-dsp,binrw,flate2,base85βdesktopfeature only
- Gate desktop-only commands in
commands/that reference gated services - Gate desktop-only code in
lib.rs(service init, command registration, menu) - Ensure
cargo check --target aarch64-apple-ios --no-default-features --features mobilepasses - Keep
desktopas a default feature so existing builds are unaffected
Shared services that must compile for both targets:
services/discovery/β metadata fetching, stream resolution, all sub-modulesservices/playlist.rsβ playlist CRUDservices/tag.rsβ tag/category CRUDservices/settings.rsβ app settingsservices/artwork.rsβ artwork cachingservices/backup.rsβ database backupproxy.rsβ localhost audio proxy (needed for mobile preview playback)
Note: n_transform.rs (YouTube de-throttling) depends on Webview::eval() β this is architecturally shared and should compile for mobile, but needs runtime validation on iOS (see #80).
Companion issue: #81 (Mobile CI target) should be set up once this issue is complete to prevent regressions.
Key files:
src-tauri/Cargo.tomlsrc-tauri/src/lib.rssrc-tauri/src/commands/*.rssrc-tauri/src/services/device.rs,audio/,media_controls.rs,export/,sync.rs,analysis.rs,library.rs
Open questions
- Should
walkdirbe shared or desktop-only? (Used for file import traversal β desktop-only) - Are there any implicit desktop dependencies in shared services (e.g., does
artwork.rsuse any desktop-only crate)?
Acceptance criteria
- Desktop build unchanged (
cargo buildworks as before with default features) - Mobile target compiles without desktop dependencies:
cargo check --target aarch64-apple-ios --no-default-features --features mobile - All shared services (discovery, tag, playlist, settings, artwork, backup) compile for both targets
proxy.rscompiles for mobile target- No runtime desktop assumptions in shared code paths
Tasks
TBD
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels