[package]
name = "micromegas-tracing"
description = "instrumentation module, part of micromegas"
keywords.workspace = true
version.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
authors.workspace = true

[dependencies]
# Shared deps (transit-free)
anyhow.workspace = true
chrono = { workspace = true, features = ["wasmbind"] }
lazy_static.workspace = true
micromegas-tracing-proc-macros = { path = "./proc-macros", version = "^0.24" }
pin-project.workspace = true
serde.workspace = true
thiserror.workspace = true
uuid.workspace = true

# Optional runtime integration
tokio = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Native-only: transit + platform deps
internment.workspace = true
memoffset.workspace = true
micromegas-transit.workspace = true
raw-cpuid.workspace = true
thread-id.workspace = true
whoami.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
js-sys = "0.3"

[target.'cfg(windows)'.dependencies]
winapi.workspace = true

[dev-dependencies]
futures = "0.3"
log.workspace = true
serde_json.workspace = true
serial_test = "3.2"
tokio = { workspace = true, features = ["time"] }

[features]
default = ["tokio"]
tokio = ["dep:tokio"]

[[bench]]
name = "with_no_dispatch"
harness = false

[[bench]]
name = "with_dispatch"
harness = false
