[package]
edition = "2024"

name = "problemo"
description = "Problemo"
version = "0.0.13"
rust-version = "1.96"

license = "MIT OR Apache-2.0"
repository = "https://codeberg.org/tliron/problemo"
documentation = "https://docs.rs/problemo"
authors = ["Tal Liron"]

readme = "README.md"

categories = ["development-tools"] # https://crates.io/category_slugs
keywords = ["error"]

[dependencies]
anyhow = { optional = true, version = "1.0.102" }
backtrace = { optional = true, version = "0.3.76" }
serde = { optional = true, version = "1.0.228" }
thin-vec = { optional = true, version = "0.2.18" }
wasmtime = { optional = true, version = "45.0.2", default-features = false }

[dev-dependencies]
anstream = "1.0.0"
derive_more = { version = "2.1.1", features = ["display", "error"] }
owo-colors = "4.3.0"
serde = { version = "1.0.228", features = ["derive"] }

[features]
default = ["thin-vec"]

## Use the backtrace library instead of std.
backtrace-external = ["dep:backtrace"]

## Anyhow error compatibility.
anyhow = ["dep:anyhow"]

## Wasmtime error compatibility.
wasmtime = ["dep:wasmtime"]

## Serde error compatibility.
serde = ["dep:serde"]

## ThinVec implementation.
thin-vec = ["dep:thin-vec"]

[[example]]
name = "debug_context"
required-features = ["backtrace-external"]

[[example]]
name = "serde"
required-features = ["serde"]

[[example]]
name = "anyhow"
required-features = ["anyhow"]

# https://stackoverflow.com/a/61417700
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
