🔐 keyring-lib
High-level, asynchronous API for keyring-rs, a cross-platform Rust library to manage credentials.
Features
- Uses Secret Service on Linux
- Uses the keyutils secure, in-memory Linux kernel cache (if available)
- Uses default system security credential on MacOS and Windows
- Supports tokio and async-std async runtimes
- Supports rustls and openssl crypto libs
- Supports serde (de)serialization from/to
String
The library comes with 6 cargo features, including 2 default ones:
tokio: enables the tokio async runtimeasync-std: enables the async-std async runtimerustls: enables the rustls cryptoopenssl: enables the openssl cryptoderive: enables serde supportvendored: compiles and statically link to a copy of non-Rust vendors like OpenSSL
Example
use ;
async
See the full API documentation on docs.rs.
FAQ
This library can be seen as a convenient async wrapper around keyring-rs. If you have an async app and just want to have a default keystore for any target OS, then keyring-lib is the right choice. If you do not have an async app, or you want more control over keystores, using keyring-rs is a much better choice.
Sponsoring
Special thanks to the NLnet foundation and the European Commission that helped the project to receive financial support from various programs:
- NGI Assure in 2022
- NGI Zero Entrust in 2023
- NGI Zero Core in 2024 (still ongoing)
All the credits go to keyring-rs. The maintainers are doing a great job there, consider supporting them first.
That said, if you appreciate this project, feel free to donate using one of the following providers:
