This is a Rust library (crate) that provides a flexible, concrete error type built atop the standard std::error::Error trait. Its primary goal is to make error handling in applications easy: instead of defining lots of custom error types, you can use anyhow::Error (or the alias anyhow::Result<T>) for fallible functions. The crate supports attaching context to errors, so you can convert a low-level error (like “file not found”) into one with richer diagnostics (“Failed to read instructions from path X”) using .context() or .with_context(). It supports downcasting (so you can inspect the underlying error type), and for recent versions of Rust, it will capture backtraces by default when the underlying error type doesn’t already. It also supports no_std mode (in limited form) by disabling default features. The README distinguishes it from library-oriented error crates (like thiserror): use anyhow when you just care about application-level error handling, not fine-grained types.

Features

  • anyhow::Error as a catch-all error type for applications
  • .context() / .with_context() to enrich error messages
  • Support for downcasting to inspect embedded error types
  • Automatic backtrace capture (for Rust versions ≥ 1.65)
  • no_std support when compiled with default-features disabled
  • Dual-license (MIT/Apache) making it broadly usable

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Anyhow

Anyhow Web Site

Other Useful Business Software
Stop Storing Third-Party Tokens in Your Database Icon
Stop Storing Third-Party Tokens in Your Database

Auth0 Token Vault handles secure token storage, exchange, and refresh for external providers so you don't have to build it yourself.

Rolling your own OAuth token storage can be a security liability. Token Vault securely stores access and refresh tokens from federated providers and handles exchange and renewal automatically. Connected accounts, refresh exchange, and privileged worker flows included.
Try Auth0 for Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Anyhow!

Additional Project Details

Programming Language

Rust

Related Categories

Rust Libraries

Registered

2025-11-14