[workspace]
members = [
    "core",
    "batcher",
    "traceparent",
    "emitter/term",
    "emitter/file",
    "emitter/file/test/integration",
    "emitter/otlp",
    "emitter/otlp/gen",
    "emitter/otlp/test/integration",
    "emitter/otlp/test/throughput",
    "emitter/otlp/test/web/native",
    "macros",
    "examples/common_patterns",
    "examples/opentelemetry/direct_otlp",
    "examples/opentelemetry/web",
    "examples/trace_zipkin",
    "examples/metric_prometheus",
    "examples/high_volume",
    "test/ui",
]

[package]
name = "emit"
version = "1.19.0"
authors = ["emit contributors"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/emit-rs/emit"
description = "Developer-first diagnostics for Rust applications."
keywords = ["logging", "tracing", "metrics", "observability"]
categories = ["development-tools::debugging"]
edition = "2021"
exclude = ["asset", "book", ".github", ".cargo"]

[package.metadata.docs.rs]
features = ["std", "rand", "sval", "serde", "implicit_rt", "implicit_internal_rt"]

[features]
default = ["std", "rand", "web", "implicit_rt", "implicit_internal_rt"]
std = ["alloc", "emit_macros/std", "emit_core/std"]
alloc = ["emit_core/alloc"]
sval = ["emit_macros/sval", "emit_core/sval", "dep:sval"]
serde = ["emit_macros/serde", "emit_core/serde", "dep:serde"]
web = ["wasm-bindgen", "js-sys"]
implicit_rt = ["emit_core/implicit_rt", "emit_macros/implicit_rt"]
implicit_internal_rt = ["emit_core/implicit_internal_rt"]

[dependencies.emit_macros]
version = "1.19.0"
path = "macros"

[dependencies.emit_core]
version = "1.19.0"
path = "core"
default-features = false

[dependencies.sval]
version = "2"
optional = true
default-features = false

[dependencies.serde]
version = "1"
optional = true
default-features = false

# rand is only pulled in as a dependency on select platforms that
# don't require `getrandom` build-time configuration

[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "android", target_os = "wasi"))'.dependencies.rand]
version = "0.10"
optional = true

[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dependencies.wasm-bindgen]
version = "0.2"
optional = true

[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dependencies.js-sys]
version = "0.3"
optional = true

[dev-dependencies.serde]
version = "1"
features = ["derive"]

[dev-dependencies.sval_test]
version = "2"

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

[target.'cfg(not(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown")))'.dev-dependencies.tokio]
version = "1"
features = ["sync", "macros", "io-util", "rt", "time"]

[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dev-dependencies.wasm-bindgen-test]
version = "0.3"

[profile.release]
debug = true
