[workspace]
resolver = "2"
members = [
    "crates/wifi-densepose-core",
    "crates/wifi-densepose-signal",
    "crates/wifi-densepose-nn",
    "crates/wifi-densepose-api",
    "crates/wifi-densepose-db",
    "crates/wifi-densepose-config",
    "crates/wifi-densepose-hardware",
    "crates/wifi-densepose-wasm",
    "crates/wifi-densepose-cli",
    "crates/wifi-densepose-mat",
    "crates/wifi-densepose-train",
    "crates/wifi-densepose-sensing-server",
    "crates/wifi-densepose-wifiscan",
    "crates/wifi-densepose-vitals",
    "crates/wifi-densepose-ruvector",
    "crates/wifi-densepose-desktop",
]
# ADR-040: WASM edge crate targets wasm32-unknown-unknown (no_std),
# excluded from workspace to avoid breaking `cargo test --workspace`.
# Build separately: cargo build -p wifi-densepose-wasm-edge --target wasm32-unknown-unknown --release
exclude = [
    "crates/wifi-densepose-wasm-edge",
]

[workspace.package]
version = "0.3.0"
edition = "2021"
authors = ["rUv <ruv@ruv.net>", "WiFi-DensePose Contributors"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/ruvnet/wifi-densepose"
documentation = "https://docs.rs/wifi-densepose"
keywords = ["wifi", "densepose", "csi", "pose-estimation", "rust"]
categories = ["science", "computer-vision", "wasm"]

[workspace.dependencies]
# Core utilities
thiserror = "1.0"
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
tokio = { version = "1.35", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

# Signal processing
ndarray = { version = "0.15", features = ["serde"] }
ndarray-linalg = { version = "0.16", features = ["openblas-static"] }
rustfft = "6.1"
num-complex = "0.4"
num-traits = "0.2"

# Neural network
tch = "0.14"
ort = { version = "2.0.0-rc.11" }
candle-core = "0.4"
candle-nn = "0.4"

# Web framework
axum = { version = "0.7", features = ["ws", "macros"] }
tower = { version = "0.4", features = ["full"] }
tower-http = { version = "0.5", features = ["cors", "trace", "compression-gzip"] }
hyper = { version = "1.1", features = ["full"] }

# Database
sqlx = { version = "0.7", features = ["runtime-tokio", "postgres", "sqlite", "uuid", "chrono", "json"] }
redis = { version = "0.24", features = ["tokio-comp", "connection-manager"] }

# Configuration
config = "0.14"
dotenvy = "0.15"
envy = "0.4"

# WASM
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
web-sys = { version = "0.3", features = ["console", "Window", "WebSocket"] }
getrandom = { version = "0.2", features = ["js"] }

# Hardware
serialport = "4.3"
pcap = "1.1"

# Graph algorithms (for min-cut assignment in metrics)
petgraph = "0.6"

# Data loading
ndarray-npy = "0.8"
walkdir = "2.4"

# Hashing (for proof)
sha2 = "0.10"

# CSV logging
csv = "1.3"

# Progress bars
indicatif = "0.17"

# CLI
clap = { version = "4.4", features = ["derive", "env"] }

# Testing
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1.4"
mockall = "0.12"
wiremock = "0.5"

# midstreamer integration (published on crates.io)
midstreamer-quic = "0.1.0"
midstreamer-scheduler = "0.1.0"
midstreamer-temporal-compare = "0.1.0"
midstreamer-attractor = "0.1.0"

# ruvector integration (published on crates.io)
# Vendored at v2.1.0 in vendor/ruvector; using crates.io versions until published.
ruvector-mincut = "2.0.4"
ruvector-attn-mincut = "2.0.4"
ruvector-temporal-tensor = "2.0.4"
ruvector-solver = "2.0.4"
ruvector-attention = "2.0.4"
ruvector-crv = "0.1.1"
ruvector-gnn = { version = "2.0.5", default-features = false }


# Internal crates
wifi-densepose-core = { version = "0.3.0", path = "crates/wifi-densepose-core" }
wifi-densepose-signal = { version = "0.3.0", path = "crates/wifi-densepose-signal" }
wifi-densepose-nn = { version = "0.3.0", path = "crates/wifi-densepose-nn" }
wifi-densepose-api = { version = "0.3.0", path = "crates/wifi-densepose-api" }
wifi-densepose-db = { version = "0.3.0", path = "crates/wifi-densepose-db" }
wifi-densepose-config = { version = "0.3.0", path = "crates/wifi-densepose-config" }
wifi-densepose-hardware = { version = "0.3.0", path = "crates/wifi-densepose-hardware" }
wifi-densepose-wasm = { version = "0.3.0", path = "crates/wifi-densepose-wasm" }
wifi-densepose-mat = { version = "0.3.0", path = "crates/wifi-densepose-mat" }
wifi-densepose-ruvector = { version = "0.3.0", path = "crates/wifi-densepose-ruvector" }

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
opt-level = 3

[profile.release-with-debug]
inherits = "release"
debug = true
strip = false

[profile.bench]
inherits = "release"
debug = true
