Expand description
Native Rust bindings for managing the pacman keyring on Arch Linux.
This crate provides a structured API for interacting with pacman-key,
parsing GPG output to return Rust types.
§Example
use pacman_key::Keyring;
#[tokio::main]
async fn main() -> pacman_key::Result<()> {
let keyring = Keyring::new();
let keys = keyring.list_keys().await?;
for key in keys {
println!("{}: {}", &key.fingerprint[..16], key.uid);
}
Ok(())
}§Requirements
- Arch Linux with
pacman-keyavailable - Root access for write operations (init, populate, sign, delete)
- Read access to
/etc/pacman.d/gnupgfor list operations
Structs§
- Key
- A GPG key from the pacman keyring.
- KeyType
- The cryptographic algorithm and key size.
- Keyring
- Interface for managing the pacman keyring.
- Read
Only Keyring - Read-only interface for querying a GPG keyring.
- Refresh
Options - Options for the key refresh operation.
- Signature
- A signature on a key.
Enums§
- Error
- KeyValidity
- GPG key validity level.
- Refresh
Progress - Progress updates during key refresh operations.