[package]
name = "fennec-modbus"
description = "Modular Modbus client implementation"
keywords = ["modbus", "modbus-client", "hardware"]
readme = "README.md"
documentation = "https://docs.rs/fennec-modbus"
publish = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]

[[bin]]
name = "fennec-modbus"
required-features = ["cli"]

[features]
default = ["cli", "tokio"]
## Enable the CLI tool.
cli = ["tokio", "tokio/rt-multi-thread", "tokio/macros", "tracing", "dep:clap", "dep:anyhow", "dep:tracing-subscriber"]
## Enable Tokio TCP transport.
tokio = ["dep:tokio", "dep:socket2"]
## Enable tracing events.
tracing = ["dep:tracing"]

[lints]
workspace = true

[dependencies]
anyhow = { version = "1.0.102", optional = true }
bytes = { version = "1.11.1", default-features = false }
clap = { version = "4.6.0", optional = true, features = ["cargo", "derive", "env", "unicode"] }
socket2 = { version = "0.6.3", optional = true }
thiserror = { version = "2.0.18", default-features = false }
tokio = { version = "1.51.1", default-features = false, optional = true, features = ["net", "sync", "time", "io-util"] }
tracing = { version = "0.1.44", optional = true }
tracing-subscriber = { version = "0.3.23", features = ["env-filter"], optional = true }

[dev-dependencies]
anyhow = "1.0.102"
