-
Notifications
You must be signed in to change notification settings - Fork 121
/
Cargo.toml
125 lines (107 loc) · 3.92 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# SPDX-FileCopyrightText: Copyright (c) 2017-2024 slowtec GmbH <[email protected]>
# SPDX-License-Identifier: MIT OR Apache-2.0
[package]
name = "tokio-modbus"
description = "Tokio-based Modbus library"
version = "0.16.1"
authors = ["slowtec GmbH <[email protected]>", "Markus Kohlhase <[email protected]>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
keywords = ["fieldbus", "modbus", "hardware", "automation"]
homepage = "https://github.com/slowtec/tokio-modbus"
repository = "https://github.com/slowtec/tokio-modbus"
edition = "2021"
rust-version = "1.76"
include = ["/src", "/CHANGELOG.md", "/README.md", "/LICENSES"]
[package.metadata.docs.rs]
all-features = true
# Please specify precise dependency versions in Cargo.toml:
# <https://users.rust-lang.org/t/psa-please-specify-precise-dependency-versions-in-cargo-toml/71277>
[dependencies]
async-trait = "0.1.77"
byteorder = "1.5.0"
bytes = "1.5.0"
futures-core = { version = "0.3.30", optional = true, default-features = false }
futures-util = { version = "0.3.30", optional = true, default-features = false }
log = "0.4.20"
smallvec = { version = "1.13.1", optional = true, default-features = false }
socket2 = { version = "0.5.5", optional = true, default-features = false }
thiserror = "2.0.3"
tokio = { version = "1.35.1", default-features = false, features = ["io-util"] }
# Disable default-features to exclude unused dependency on libudev
tokio-serial = { version = "5.4.4", optional = true, default-features = false }
tokio-util = { version = "0.7.10", optional = true, default-features = false, features = ["codec"] }
[dev-dependencies]
anyhow = "1.0.86"
env_logger = "0.11.5"
futures = "0.3.30"
tokio = { version = "1.35.1", default-features = false, features = [
"macros",
"rt-multi-thread",
"time",
] }
tokio-serial = { version = "5.4.4", default-features = false }
rustls-pemfile = "2.1.2"
tokio-rustls = { version = "0.26.0", default-features = false }
pkcs8 = { version = "0.10.2", features = ["encryption", "pem", "std"] }
pem = "3.0.4"
pki-types = { package = "rustls-pki-types", version = "1" }
rustls = { version = "0.23.12", default-features = false, features = ["std"] }
[features]
default = ["rtu", "tcp"]
rtu = ["dep:futures-core", "futures-util/sink", "dep:smallvec", "dep:tokio-util"]
tcp = ["dep:futures-core", "futures-util/sink", "tokio/net", "dep:tokio-util"]
rtu-sync = ["rtu", "sync", "dep:tokio-serial"]
tcp-sync = ["tcp", "sync"]
rtu-server = ["rtu", "server", "tokio/macros", "dep:tokio-serial"]
tcp-server = ["tcp", "server", "socket2/all", "tokio/macros", "tokio/rt-multi-thread"]
rtu-over-tcp-server = ["rtu", "tcp-server"]
# The following features are internal and must not be used in dependencies.
sync = ["dep:futures-core", "futures-util/sink", "tokio/time", "tokio/rt"]
server = []
[badges]
maintenance = { status = "actively-developed" }
[[example]]
name = "rtu-client-sync"
path = "examples/rtu-client-sync.rs"
required-features = ["rtu-sync"]
[[example]]
name = "rtu-client"
path = "examples/rtu-client.rs"
required-features = ["rtu"]
[[example]]
name = "rtu-server"
path = "examples/rtu-server.rs"
required-features = ["rtu-server"]
[[example]]
name = "rtu-server-address"
path = "examples/rtu-server-address.rs"
required-features = ["rtu-server"]
[[example]]
name = "tcp-client-custom-fn"
path = "examples/tcp-client-custom-fn.rs"
required-features = ["tcp"]
[[example]]
name = "tcp-client-sync"
path = "examples/tcp-client-sync.rs"
required-features = ["tcp-sync"]
[[example]]
name = "tcp-client"
path = "examples/tcp-client.rs"
required-features = ["tcp"]
[[example]]
name = "tcp-server"
path = "examples/tcp-server.rs"
required-features = ["tcp-server"]
[[example]]
name = "rtu-over-tcp-server"
path = "examples/rtu-over-tcp-server.rs"
required-features = ["rtu-over-tcp-server"]
[[example]]
name = "tls-client"
path = "examples/tls-client.rs"
required-features = ["tcp"]
[[example]]
name = "tls-server"
path = "examples/tls-server.rs"
required-features = ["tcp-server"]