Repository navigation
Labels
Milestone
Description
Goal
app-shell states in code which Tauri plugin crates an app crate that embeds it must list as direct dependencies, and the community app checks its own Cargo.toml against that list in a test. A plugin added to app-shell later cannot be forgotten in an app crate again (the cause of #795).
Context
- The Tauri CLI only bundles the Android project of plugins that are direct dependencies of the app crate, and
tauri-buildonly grants plugin permissions for direct dependencies (comment inapps/smart-ssh-community/Cargo.toml:30-35). apps/smart-ssh-community/Cargo.toml:35-50lists by hand:tauri-plugin-dialog,tauri-plugin-notification,tauri-plugin-opener,tauri-plugin-os,tauri-plugin-store, desktop-onlytauri-plugin-decoration, Android-onlytauri-plugin-fs; after Android: ship the session service and microphone plugins as a plugin crate with an Android library module #888 alsotauri-plugin-android-host.- Nothing ties this list to what
app-shellactually registers (register_unlocked_plugins_on,crates/app-shell/src/lib.rs:1079-1118, plus the decoration plugin and the plugin from Android: ship the session service and microphone plugins as a plugin crate with an Android library module #888). Issue Android: app aborts at launch (Keystore store without Android context, file plugin's Android part not bundled) #795 (app aborted at launch becausetauri-plugin-fs's Android part was missing) is exactly this drift. docs/android-build.mdsection "App-Crates, dieapp-shelleinbetten" describes the rule in prose only.
Requirements
app-shellexports a public constant, e.g.listing every Tauri plugin cratepub struct RequiredPluginCrate { pub name: &'static str, pub target: PluginTarget } pub enum PluginTarget { All, DesktopOnly, AndroidOnly } pub const REQUIRED_DIRECT_PLUGIN_CRATES: &[RequiredPluginCrate] = &[…];
app-shellregisters, with the target it is registered for.- A test inside
app-shellkeeps the constant honest: it readscrates/app-shell/Cargo.tomland asserts that everytauri-plugin-*dependency ofapp-shell(normal andtarget.*tables) appears in the constant with a matching target, and vice versa. Plugins that need no direct dependency of the app (no webview permissions and no Android part, todaytauri-plugin-single-instance,crates/app-shell/Cargo.toml:60) stay out of the constant and are listed in an explicit exemption list in the test, each with a one-line reason. - A test in
apps/smart-ssh-community(tests/direct_plugin_deps.rs) parses its ownCargo.toml([dependencies]and[target.'cfg(…)'.dependencies]) and asserts that every entry of the constant is a direct dependency for (at least) its target. Failure message names the missing crate and the table to add it to. - The test is written so another app crate can copy it unchanged (it only uses
app_shell::REQUIRED_DIRECT_PLUGIN_CRATESandCARGO_MANIFEST_DIR). docs/android-build.md: the Android: app aborts at launch (Keystore store without Android context, file plugin's Android part not bundled) #795 section points to the constant and the test instead of a prose list.
Acceptance Criteria
-
app_shell::REQUIRED_DIRECT_PLUGIN_CRATESexists and lists exactly thetauri-plugin-*cratesapp-shelldepends on, minus the documented exemptions, with targets. - The
app-shellself-check test fails when atauri-plugin-*dependency is added tocrates/app-shell/Cargo.tomlwithout a constant entry (counter-check described in the test doc comment). -
apps/smart-ssh-community/tests/direct_plugin_deps.rspasses; removing e.g.tauri-plugin-osfrom the app'sCargo.tomlmakes it fail with a message namingtauri-plugin-os. - Parsing uses a TOML parser (
toml, already inCargo.locktransitively; add it as a dev-dependency), no regex on TOML. -
docs/android-build.mdupdated. - Relevant automated tests pass (
cargo test --workspace, clippy).
Technical Notes
- Files:
crates/app-shell/src/lib.rs(or a new small modulerequired_plugins.rsre-exported at the root),apps/smart-ssh-community/tests/direct_plugin_deps.rs(new),apps/smart-ssh-community/Cargo.toml([dev-dependencies]fortomlif needed),docs/android-build.md. tomlas a dev-dependency only;cargo deny checkmust stay green.- No security-relevant code path is touched.
Spec impact: none
Open questions
- none
Related Work
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
P2 - Normal
Activity
feat(app-shell): export required direct plugin crates and check them …
fix(app-shell): restore android-host entry in Cargo.lock (#891)
smart-ssh-coder commentedon Nov 1, 2026
Implementation ready for review. PR #1045. Added app_shell::REQUIRED_DIRECT_PLUGIN_CRATES with an app-shell self-check test and apps/smart-ssh-community/tests/direct_plugin_deps.rs (toml dev-dependency); docs/android-build.md updated. Counter-checks done; CI green on PR #1045.
smart-ssh-reviewer commentedon Nov 1, 2026
Review passed – moving on to merge. Approved. REQUIRED_DIRECT_PLUGIN_CRATES with the app-shell self-check and the app manifest test are in place. Counter-proofs are red without the entry and green with it. CI is green. docs/android-build.md is updated.
feat(app-shell): export required direct plugin crates with a check in…
smart-ssh-coordinator commentedon Nov 1, 2026
Merged and branch deleted: PR #1045 (squash) in develop