dtolnay/anyhow

Flexible concrete Error type built on std::error::Error

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 9 minutes ago
Added to GitGenius on September 9th, 2026
Created on October 5th, 2019
Open Issues & Pull Requests: 44 (+0)
GitHub issues: Enabled
Number of forks: 223
Total Stargazers: 6,655 (+0)
Total Subscribers: 24 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.1 hours
Mean response time: 35.3 days
90th percentile: 125.9 days
Tracked items: 37

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 4% of issues opened in the past year have been closed. Three people close 88% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 18
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 603 days
Stale 30+ days: 16
Stale 90+ days: 11

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Detailed Description

Anyhow is a flexible error handling library for Rust that provides a trait object based Error type for idiomatic error propagation in applications.

The library solves the problem of ergonomic error handling in Rust by offering anyhow::Error as a return type that works seamlessly with the ? operator to propagate any error implementing std::error::Error. It allows developers to attach contextual information to low-level errors, making debugging easier by explaining what higher-level operation was underway when an error occurred. The tool supports downcasting errors by value, shared reference, or mutable reference as needed. When running on Rust 1.65 or later, backtraces are automatically captured and printed if the underlying error type does not provide its own, controlled through environment variables like RUST_BACKTRACE or RUST_LIB_BACKTRACE.

Anyhow suits any Rust application where you want straightforward error handling without defining custom error types for every function. It works with error types from any crate that implements std::error::Error, and one-off error messages can be constructed with the anyhow! macro or bail! macro for early returns. The library also supports no_std environments when the std feature is disabled, though a global allocator is required. Compared to failure, anyhow::Error is built on the standard library's std::error::Error trait rather than a separate trait, leveraging improvements adopted by the standard library itself.

The project maintains a clean, focused codebase with regular CI validation. Development activity shows consistent attention to compatibility across Rust versions, including special handling for older versions where certain trait functionality differs. The tool receives updates that address edge cases and maintain alignment with evolving Rust standards.