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
Earn up to 15% annual interest with Nexo. Icon
Earn up to 15% annual interest with Nexo.

Let your crypto work for you

Put idle assets to work with competitive interest rates, borrow without selling, and trade with precision. All in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
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