# anyhow

> A flexible concrete error type for easy error handling in Rust applications

Source: https://talira.ai/catalog/anyhow-y7bkkahz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / error handling](https://talira.ai/categories/libraries/error-handling)
- Licence: MIT OR Apache-2.0[^1]
- Pricing: Free and open source
- Free tier: yes
- Backed by: [David Tolnay](https://talira.ai/orgs/dtolnay.md)

anyhow provides anyhow::Error, a trait object based error type for easy, idiomatic error handling in [Rust](https://talira.ai/catalog/rust-mf51vs5t.md) applications. Return anyhow::Result\<T\> from any fallible function and use ? to propagate any error that implements std::error::Error, including your own crate's. context and with_context attach a message saying what higher-level step failed, errors can be downcast back to their concrete type, and on Rust 1.65 or later a backtrace is captured when the standard RUST_BACKTRACE or RUST_LIB_BACKTRACE environment variables enable it. The anyhow! macro builds a one-off error with string interpolation, and bail! returns one early. It works in no_std with a global allocator when the default std feature is turned off. Its README suggests it for application code that doesn't care which error type functions return, and [thiserror](https://talira.ai/catalog/thiserror-rg8exjm1.md), by the same author, for libraries that design their own error types.

## Links

- GitHub: https://github.com/https://github.com/dtolnay/anyhow
- Docs: https://docs.rs/anyhow

## Problems it solves

- handle errors in my Rust application without defining an error enum
- add context to a Rust error so I know which step failed
- return any kind of error from a Rust function with the ? operator

## Features

- anyhow::Error and anyhow::Result
- ? propagation of any std::error::Error
- context and with_context messages
- downcasting to the concrete error type
- backtrace capture
- anyhow! and bail! macros
- no_std support

## Trust

Overall: 0.55 out of 1.
Signals: maintenance 0.67, adoption 0.77, momentum 0.57, community 0.58, backing 0.30, extensibility 0.00.

- last commit yesterday
- 11 commits in the last 90 days
- latest release 1.0.105 yesterday
- 6.7k GitHub stars
- 28 contributors
- accepts sponsorship (Github)
- backed by David Tolnay

## Alternatives

- [thiserror](https://talira.ai/catalog/thiserror-rg8exjm1.md): derive(Error) for Rust's std::error::Error trait

## Sources

[^1]: https://github.com/dtolnay/anyhow/blob/master/Cargo.toml (checked 24 Nov 2026)
