[package]
name = "rodbus"
version = "1.5.0"
description = "A high-performance async implementation of the Modbus protocol using tokio"
readme = "README.md"

# inherit from workspace
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
license-file.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true

[lints]
workspace = true

[dependencies]
crc = { version = "3", optional = true }
scursor = "0.5.0"
tokio = { workspace = true, features = ["net", "sync", "io-util", "io-std", "time", "rt", "rt-multi-thread", "macros"] }
tracing = { workspace = true }

# TLS dependencies
rx509 = { version = "0.2", optional = true }
sfio-rustls-config = { version = "0.4", default-features = false, optional = true }
tokio-rustls = { version = "0.26", features = ["tls12"], default-features = false, optional = true }

# serial dependencies
tokio-serial = { version = "5.4", default-features = false, optional = true }

# serialize dependencies
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true}

[dev-dependencies]
tokio-test = "0.4"
sfio-tokio-mock-io = "0.2"

[features]
default = ["tls", "serial"]
ffi = []
enable-tls = ["rx509", "tokio-rustls"]
tls = ["enable-tls", "sfio-rustls-config/crypto-ring"]
tls-aws-lc = ["enable-tls", "sfio-rustls-config/crypto-aws-lc"]
serial = ["crc", "tokio-serial"]
serialization = ["serde"]
