[package]
name          = "emotiv"
version       = "0.0.2"
edition       = "2021"
rust-version  = "1.75"
description   = "Async Rust client and TUI for Emotiv EEG headsets via the Cortex API WebSocket (JSON-RPC 2.0)"
keywords      = ["eeg", "bci", "emotiv", "cortex", "neuroscience"]
categories    = ["science", "api-bindings", "command-line-utilities"]
license       = "MIT"
readme         = "README.md"
repository    = "https://github.com/eugenehp/emotiv-rs"
homepage      = "https://github.com/eugenehp/emotiv-rs"
documentation = "https://docs.rs/emotiv"

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

# ── Binary targets ────────────────────────────────────────────────────────────

[[bin]]
name = "emotiv-cli"
path = "src/main.rs"

[[bin]]
name = "emotiv-tui"
path = "src/bin/tui.rs"
required-features = ["tui"]

# ── Examples (mirror cortex-example scripts) ──────────────────────────────────

[[example]]
name = "sub_data"
path = "examples/sub_data.rs"

[[example]]
name = "client_mode"
path = "examples/client_mode.rs"

[[example]]
name = "record"
path = "examples/record.rs"

[[example]]
name = "marker"
path = "examples/marker.rs"

[[example]]
name = "mental_command_train"
path = "examples/mental_command_train.rs"

[[example]]
name = "live_advance"
path = "examples/live_advance.rs"

[[example]]
name = "query_records"
path = "examples/query_records.rs"

[[example]]
name = "facial_expression_train"
path = "examples/facial_expression_train.rs"

[[example]]
name = "simulate"
path = "examples/simulate.rs"
required-features = ["simulate"]

# ── Features ──────────────────────────────────────────────────────────────────

[features]
default  = ["tui"]
tui      = ["dep:ratatui", "dep:crossterm"]
simulate = []
config-toml = ["dep:toml"]

# ── Dependencies ──────────────────────────────────────────────────────────────

[dependencies]
tokio            = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-native-roots"] }
rustls            = "0.23"
serde            = { version = "1", features = ["derive"] }
serde_json       = "1"
futures-util     = "0.3"
log              = "0.4"
env_logger       = "0.11"
anyhow           = "1"
thiserror        = "2"
tracing          = "0.1"
toml             = { version = "0.9", optional = true }
uuid             = { version = "1", features = ["v4"] }
chrono           = { version = "0.4", features = ["serde"] }
rand             = "0.8"

# Optional TUI dependencies
ratatui   = { version = "0.30.0", features = ["crossterm"], optional = true }
crossterm = { version = "0.29", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
