[package] name = "error-stack" version = "0.5.0" authors = ["HASH"] edition = "2021" rust-version = "1.63.0" license = "MIT OR Apache-2.0" description = "A context-aware error-handling library that supports arbitrary attached user data" documentation = "https://docs.rs/error-stack" readme = "README.md" repository = "https://github.com/hashintel/hash/tree/main/libs/error-stack" keywords = ["error", "errorstack", "error-handling", "report", "no_std"] categories = ["rust-patterns", "no-std"] exclude = ["package.json", ".config/lints.toml"] [dependencies] tracing-error = { version = "0.2", optional = true, default-features = false } anyhow = { version = ">=1.0.73", default-features = false, optional = true } eyre = { version = "0.6", default-features = false, optional = true } serde = { version = "1", default-features = false, optional = true } spin = { version = "0.9", default-features = false, optional = true, features = ['rwlock', 'once'] } [dev-dependencies] serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } futures = { version = "0.3.30", default-features = false, features = ["executor"] } trybuild = "1.0.97" tracing = "0.1.40" tracing-subscriber = "0.3.18" insta = { version = "1.39.0", features = ['filters', 'ron'] } regex = "1.10.5" expect-test = "1.5.0" ansi-to-html = "0.2.1" once_cell = "1.19.0" supports-color = "3.0.0" supports-unicode = "3.0.0" owo-colors = "4.0.0" thiserror = "1.0.61" [build-dependencies] rustc_version = "0.4" [features] default = ["std", "backtrace"] std = ["anyhow?/std"] # Enables support for `Error` backtrace = ["std"] # Enables automatic capturing of `Backtrace`s (requires Rust 1.65+) spantrace = ["dep:tracing-error", "std"] # Enables automatic capturing of `SpanTrace`s serde = ["dep:serde"] # Enables serialization support hooks = ['dep:spin'] # Enables hooks on `no-std` platforms using spin locks anyhow = ["dep:anyhow"] # Provides `into_report` to convert `anyhow::Error` to `Report` eyre = ["dep:eyre", "std"] # Provides `into_report` to convert `eyre::Report` to `Report` [lints] workspace = true [package.metadata.docs.rs] all-features = true cargo-args = ["-Z", "unstable-options", "-Z", "rustdoc-scrape-examples"] targets = ["x86_64-unknown-linux-gnu"] [[example]] name = "demo" required-features = ["std"] doc-scrape-examples = true [[example]] name = "exit_code" required-features = ["std"] doc-scrape-examples = true [[example]] name = "parse_config" required-features = ["std"] doc-scrape-examples = true [[example]] name = "detect" required-features = ['std'] doc-scrape-examples = true [[test]] name = "common" test = false