Skip to content

fix(cli): use keyring-core + native platform stores (drop keyring meta-crate)#165

Merged
BryanFRD merged 1 commit into
mainfrom
fix/keyring-core-native-store
Jun 26, 2026
Merged

fix(cli): use keyring-core + native platform stores (drop keyring meta-crate)#165
BryanFRD merged 1 commit into
mainfrom
fix/keyring-core-native-store

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #163. Supersedes #164 (the cli-feature quick fix, which dragged in clap, rpassword and a SQLite engine).

CI (Rust CLI) has been red on main since the keyring 4.1.0/4.1.1 bumps (#159/#160): keyring 4.1 moved use_native_store behind a cli feature, so keyring::use_native_store no longer resolves with default features.

The keyring maintainers explicitly recommend that real apps link keyring-core + only the platform store crates they need, rather than the keyring meta-crate. This does that:

  • Drop the keyring dependency. Keep keyring-core (already used for Entry).
  • Add per-target native stores: zbus-secret-service-keyring-store (Linux, crypto-rust), apple-native-keyring-store (macOS, keychain), windows-native-keyring-store (Windows).
  • storage.rs sets the default store via keyring_core::set_default_store(<platform>::Store::new_with_configuration(..)) under #[cfg(target_os)]. Behavior is identical to the old use_native_store(true) (Linux → Secret Service via zbus).

No SQLite/clap/rpassword pulled in: the lockfile shrinks (−13 net) instead of the +1443 the cli feature added.

Verified locally on Windows: cargo check, cargo clippy --all-targets -- -D warnings (pedantic on), cargo fmt --check all green. CI covers Linux.

@BryanFRD BryanFRD enabled auto-merge (squash) June 26, 2026 10:49
@BryanFRD BryanFRD merged commit 6d92489 into main Jun 26, 2026
20 checks passed
@BryanFRD BryanFRD deleted the fix/keyring-core-native-store branch June 26, 2026 10:52
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.

CLI build broken on keyring 4.1: use_native_store moved behind the cli feature

1 participant