[package]
name = "smart-power-button-esp"
publish = false
edition = "2021"

[profile.release]
opt-level = "s"

[profile.dev]
debug = true    # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[patch.crates-io]
socket2 = { git = "https://github.com/rust-lang/socket2", branch = "master" }

[dependencies]
esp-idf-svc = { version = "0.49.0", default-features = false }
log = "0.4.17"
anyhow = "1"
tokio = { version = "*", features = [
    "rt",
    "net",
    "io-util",
    "macros",
    "sync",
    "time",
] }
hyper = { version = "1.3.1", features = ["server", "http1"] }
hyper-util = { version = "0.1.5", features = ["tokio"] }
http-body-util = "0.1.2"
hyper-tungstenite = "0.14.0"
futures = "0.3.30"
include_dir = { version = "0.7.4", features = ["metadata"] }
dotenvy_macro = "0.15.7"
parking_lot = "0.12.3"
postcard = { version = "1.0.8", features = ["alloc"] }
smart-power-button-common = { version = "0.1.0", path = "../common" }
chrono = "0.4.38"
esp32-nimble = "0.7.0"
heapless = "0.8.0"

[features]
default = ["std", "embassy", "esp-idf-svc/native", "static-files"]
pio = ["esp-idf-svc/pio"]
std = ["alloc", "esp-idf-svc/binstart", "esp-idf-svc/std"]
alloc = ["esp-idf-svc/alloc"]
nightly = ["esp-idf-svc/nightly"]
experimental = ["esp-idf-svc/experimental"]
embassy = [
    "esp-idf-svc/embassy-sync",
    "esp-idf-svc/critical-section",
    "esp-idf-svc/embassy-time-driver",
]
static-files = []

[build-dependencies]
embuild = "0.32.0"
anyhow = "1"
