# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "diagweave"
version = "0.2.2"
authors = ["Shao G. <shaogme@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core runtime and macros re-export for diagweave error algebra and report diagweaveing."
homepage = "https://github.com/shaogme/diagweave-workspace"
documentation = "https://docs.rs/diagweave"
readme = "README.md"
keywords = [
    "error-handling",
    "diagnostics",
    "result",
    "diagweave",
]
categories = [
    "rust-patterns",
    "development-tools::debugging",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/shaogme/diagweave-workspace"

[features]
default = ["std"]
json = [
    "dep:serde",
    "dep:serde_json",
]
opentelemetry = [
    "std",
    "otel",
    "dep:opentelemetry",
    "opentelemetry/logs",
    "dep:opentelemetry_sdk",
    "opentelemetry_sdk/logs",
]
otel = []
std = [
    "tracing?/std",
    "ref_str/std",
]
trace = []
tracing = [
    "trace",
    "dep:tracing",
]

[lib]
name = "diagweave"
path = "src/lib.rs"

[[test]]
name = "derive_error"
path = "tests/derive_error.rs"

[[test]]
name = "derive_ok"
path = "tests/derive_ok.rs"

[[test]]
name = "global_config"
path = "tests/global_config.rs"

[[test]]
name = "macro_ok"
path = "tests/macro_ok.rs"

[[test]]
name = "report"
path = "tests/report.rs"

[[test]]
name = "report_ir"
path = "tests/report_ir.rs"

[[test]]
name = "report_ir_tracing"
path = "tests/report_ir_tracing.rs"

[[test]]
name = "report_json"
path = "tests/report_json.rs"

[[test]]
name = "report_more"
path = "tests/report_more.rs"

[[test]]
name = "report_render"
path = "tests/report_render.rs"

[[test]]
name = "report_snapshots"
path = "tests/report_snapshots.rs"

[[test]]
name = "report_source"
path = "tests/report_source.rs"

[[test]]
name = "set_derive_ok"
path = "tests/set_derive_ok.rs"

[[test]]
name = "trybuild"
path = "tests/trybuild.rs"

[[test]]
name = "union_ok"
path = "tests/union_ok.rs"

[[bench]]
name = "report_bench"
path = "benches/report_bench.rs"
harness = false

[dependencies.diagweave-macros]
version = "0.1.2"

[dependencies.opentelemetry]
version = "0.31"
optional = true
default-features = false

[dependencies.opentelemetry_sdk]
version = "0.31"
optional = true
default-features = false

[dependencies.ref_str]
version = "0.2.0"
features = ["serde"]

[dependencies.serde]
version = "1.0"
features = [
    "derive",
    "alloc",
    "rc",
]
optional = true
default-features = false

[dependencies.serde_json]
version = "1.0"
features = [
    "alloc",
    "alloc",
]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1"
optional = true
default-features = false

[dev-dependencies.criterion]
version = "0.8.2"

[dev-dependencies.insta]
version = "1"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "registry",
    "std",
    "registry",
    "std",
]
default-features = false

[dev-dependencies.trybuild]
version = "1.0"

[lints.clippy.cognitive_complexity]
level = "deny"
priority = 1

[lints.rust]
warnings = "deny"
