You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(credential): enable cargo:libsecret on all Unix platforms except macOS and mobile
Widen the libsecret credential provider's cfg gate from
`target_os = "linux"` to
`all(unix, not(any(target_os = "macos", "ios", "tvos", "watchos", "visionos", "android")))`,
making the provider available on the BSDs and other Unix-like systems.
libsecret is loaded dynamically at runtime via libloading (which supports
these platforms), and the library plus Secret Service implementations are
packaged on FreeBSD, OpenBSD, and NetBSD, so the previous Linux-only gate
was an artificial restriction rather than a technical one. macOS keeps its
OS-specific keyring provider (cargo:macos-keychain), and the mobile Unix
targets (iOS-family, Android) are excluded since libsecret does not exist
there.
Also document the provider's platform availability in
registry-authentication.md and the crate README.
This is pre-work for RFC 3981 (store registry tokens in the OS credential
store by default), which flips secure token storage from opt-in to the
default and notes the BSD gap in Cargo's built-in providers:
rust-lang/rfcs#3981
Tested on a FreeBSD 15.1-RELEASE amd64 VirtualBox VM with libsecret and
gnome-keyring over a D-Bus session bus: LibSecretCredential::new() loads
libsecret via dlopen, and login/get/logout round-trips through the Secret
Service correctly (token stored, retrieved matching, removed, and
reported absent after logout). cargo check -p cargo and cargo fmt pass on
x86_64-unknown-linux-gnu.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments