Crate aur_rs

source ·
Expand description

This is a library for interacting with the Arch User Repository (AUR). It is a work in progress and is not ready for production use. The goal is to provide a simple interface for interacting with the AUR.

For a basic name search call search_package which takes a package name and returns a SearchResponse struct. This struct contains a results field which is a vector of Package structs. These structs contain information about the package.

Example

#[tokio::main]
async fn main() {
    let response = aur_rs::search_package("yay-bin").await.unwrap();
    println!("#{:#?}", response);
}

Another way to get information about a package is to use the package_info function. This function takes a package name and returns ReturnData.

Example

#[tokio::main]
async fn main() {
    let response = aur_rs::package_info("yay-bin").await.unwrap();

    if let Some(keywords) = &response.results[0].keywords {
       println!("Keywords: {:?}", keywords);
   }
}

Structs

  • This is a package. TODO(2020-05-03): Add more documentation.
  • This is a a response to a search request.

Functions