[package]
name          = "esp-hal-embassy"
version       = "0.8.0"
edition       = "2024"
rust-version  = "1.86.0"
description   = "Embassy support for esp-hal"
documentation = "https://docs.espressif.com/projects/rust/esp-hal-embassy/latest/"
keywords      = ["async", "embedded", "esp32", "espressif"]
categories    = ["asynchronous", "embedded", "hardware-support", "no-std"]
repository    = "https://github.com/esp-rs/esp-hal"
license       = "MIT OR Apache-2.0"

[package.metadata.docs.rs]
default-target = "riscv32imac-unknown-none-elf"
features       = ["esp32c6"]

[lib]
bench = false
test  = false

[dependencies]
cfg-if                    = "1.0.0"
critical-section          = "1.2.0"
esp-hal                   = { version = "1.0.0-beta.1", path = "../esp-hal" }
portable-atomic           = "1.11.0"
static_cell               = "2.1.0"

# Unstable dependencies that are not (strictly) part of the public API
document-features         = "0.2.11"
embassy-sync              = { version = "0.6.2" }
embassy-time              = { version = "0.4.0" }
embassy-time-driver       = { version = "0.2.0", features = [ "tick-hz-1_000_000" ] }
embassy-time-queue-utils  = { version = "0.1.0", features = ["_generic-queue"] }
esp-config                = { version = "0.4.0", path = "../esp-config" }
macros                    = { version = "0.18.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }

# Optional dependencies that enable ecosystem support.
embassy-executor          = { version = "0.7.0", features = ["timer-item-payload-size-4"], optional = true }

# Logging interfaces, they are mutually exclusive so they need to be behind separate features.
defmt                     = { version = "1.0.1", optional = true }
log-04                    = { package = "log", version = "0.4.27", optional = true }

[build-dependencies]
esp-build    = { version = "0.3.0", path = "../esp-build" }
esp-config   = { version = "0.4.0", path = "../esp-config", features = ["build"] }
esp-metadata = { version = "0.7.0", path = "../esp-metadata" }

[features]
default = ["executors"]

esp32   = ["esp-hal/esp32"]
esp32c2 = ["esp-hal/esp32c2"]
esp32c3 = ["esp-hal/esp32c3"]
esp32c6 = ["esp-hal/esp32c6"]
esp32h2 = ["esp-hal/esp32h2"]
esp32s2 = ["esp-hal/esp32s2"]
esp32s3 = ["esp-hal/esp32s3"]

## Enable the `Executor` and `InterruptExecutor` embassy executor implementations.
executors = ["dep:embassy-executor", "esp-hal/__esp_hal_embassy"]

#! ### Logging Feature Flags
## Enable logging output using version 0.4 of the `log` crate.
log-04 = ["dep:log-04"]
## Enable logging output using `defmt` and implement `defmt::Format` on certain types.
defmt = ["dep:defmt", "embassy-executor?/defmt", "esp-hal/defmt"]

[lints.rust]
unexpected_cfgs = "allow"
