https://github.com/stoically/keytar-rs
keytar bindings for Rust
https://github.com/stoically/keytar-rs
Last synced: about 1 year ago
JSON representation
keytar bindings for Rust
- Host: GitHub
- URL: https://github.com/stoically/keytar-rs
- Owner: stoically
- Created: 2020-05-31T00:28:48.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2022-09-15T20:56:12.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T11:26:33.539Z (over 1 year ago)
- Language: Rust
- Homepage: https://crates.io/crates/keytar
- Size: 33.2 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# keytar-rs
[](https://crates.io/crates/keytar)
[](https://docs.rs/keytar/)


[keytar](https://github.com/atom/node-keytar) bindings for Rust
**Note:** You might want to consider using the [keyring](https://crates.io/crates/keyring) crate instead, which is fully written in Rust.
A native Node module to get, add, replace, and delete passwords in system's keychain. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.
```rust
let service = "service";
let account = "account";
let password = "password";
keytar::set_password(service, account, password).unwrap();
```
## Linux Requirement
Currently this library uses `libsecret`. Depending on your distribution,
you will need to install the appropriate package, e.g.:
- Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
- Red Hat-based: `sudo yum install libsecret-devel`
- Arch Linux: `sudo pacman -S libsecret`