[package] name = "modbus-mapping" authors.workspace = true description.workspace = true edition.workspace = true keywords.workspace = true license.workspace = true readme.workspace = true repository.workspace = true rust-version.workspace = true version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] async-trait = "0.1" modbus-mapping-derive = { version = "0.3.0", path = "../modbus-mapping-derive" } tokio = { version = "1", features = ["full"] } tokio-modbus = { version = "0.13", features = ["default"]} # Optional futures = {version = "0.3", optional = true} rand_chacha = { version = "0.3", optional = true } rand_distr = { version = "0.4", optional = true } tokio-serial = {version = "5.4", optional = true } tokio-stream = {version = "0.1", optional = true } [features] simulator = ["dep:futures", "dep:tokio-serial", "dep:tokio-stream", "tokio-modbus/rtu-server", "tokio-modbus/tcp-server"] serial = ["dep:tokio-serial"] examples = ["dep:rand_chacha", "dep:rand_distr"] [[example]] name = "tcp-device" path = "examples/tcp_device.rs" required-features = ["examples", "simulator"] [[example]] name = "tcp-client" path = "examples/tcp_client.rs" required-features = ["examples"] [[example]] name = "rtu-device" path = "examples/rtu_device.rs" required-features = ["examples", "serial", "simulator"] [[example]] name = "rtu-client" path = "examples/rtu_client.rs" required-features = ["examples", "serial"] [[example]] name = "no-macros" path = "examples/no_macros.rs" required-features = ["examples"]