| Crates.io | debbugs |
| lib.rs | debbugs |
| version | 0.1.8 |
| created_at | 2023-10-03 23:24:31.99159+00 |
| updated_at | 2025-10-30 14:29:03.024873+00 |
| description | Debian Bugtracking System API client |
| homepage | |
| repository | https://github.com/jelmer/debbugs-rs |
| max_upload_size | |
| id | 991647 |
| size | 155,253 |
A Rust client library for the Debian Bug Tracking System (Debbugs).
This crate provides a simple wrapper around the SOAP API for the Debian bug tracking system, allowing you to query bug reports, search for bugs, and retrieve detailed information programmatically.
debbugs::Debbugs (async) and debbugs::blocking::Debbugs (blocking)mailparse featureAdd this to your Cargo.toml:
[dependencies]
debbugs = "0.1"
blocking (default): Enables the blocking client interfacetokio (default): Enables the async client interfacemailparse (default): Enables parsing of email messages in bug logsuse debbugs::Debbugs;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Debbugs::default();
// Get the 10 newest bugs
let bugs = client.newest_bugs(10).await?;
println!("Latest bugs: {:?}", bugs);
// Get detailed status for specific bugs
let reports = client.get_status(&[12345, 67890]).await?;
for report in reports {
println!("Bug #{}: {}", report.bugnumber, report.subject);
}
// Search for bugs in a specific package
let search = debbugs::SearchQuery {
package: Some("rust-debbugs".to_string()),
..Default::default()
};
let found_bugs = client.get_bugs(search).await?;
println!("Found {} bugs in package", found_bugs.len());
Ok(())
}
use debbugs::blocking::Debbugs;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Debbugs::default();
// Get the 10 newest bugs
let bugs = client.newest_bugs(10)?;
println!("Latest bugs: {:?}", bugs);
// Get bug logs with messages
let logs = client.get_bug_log(12345)?;
for log in logs {
println!("Message: {}", log.header);
}
Ok(())
}
use debbugs::Debbugs;
let client = Debbugs::new("https://custom-debbugs.example.com/soap.cgi");
The repository includes several examples in the examples/ directory:
newest.rs - Fetch the newest bugsget_status.rs - Get detailed status for specific bugsget_bugs.rs - Search for bugs matching criteriaget_bug_log.rs - Retrieve bug logs and messageswnpp_bugs.rs - Find Work-Needing and Prospective Packages (WNPP) bugsall.rs - Fetch all bugs (use with caution!)Run an example with:
cargo run --example newest --features tokio
Licensed under the Apache License, Version 2.0.