-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
143 lines (130 loc) · 3.42 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[package]
name = "modbus-relay"
version = "2024.12.0"
edition = "2021"
authors = ["Artur Wyszyński <[email protected]>"]
description = "A high performance Modbus TCP to RTU relay"
homepage = "https://github.com/aljen/modbus-relay"
repository = "https://github.com/aljen/modbus-relay"
documentation = "https://docs.rs/modbus-relay"
readme = "README.md"
license = "MIT OR Apache-2.0"
rust-version = "1.83"
keywords = ["hardware", "modbus", "client", "server", "relay"]
categories = ["embedded", "hardware-support", "network-programming"]
exclude = [
".github/**/*",
"docs/**/*",
"tests/**/*",
"examples/**/*",
"benches/**/*",
]
include = [
"src/**/*",
"LICENSE*",
"README.md",
"CHANGELOG.md",
"config/config.example.yaml",
]
[badges]
maintenance = { status = "actively-developed" }
[dependencies]
axum = "0.7.9"
clap = { version = "4.5.23", features = ["derive"] }
config = "0.14.1"
futures = "0.3.31"
hex = "0.4.3"
humantime-serde = "1.1.1"
libc = "0.2.167"
rand = { version = "0.8.5", features = ["small_rng"] }
rmodbus = "0.9.9"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
serde_yaml = "0.9.34"
serialport = "4.6.1"
socket2 = "0.5.8"
thiserror = "2.0.4"
time = { version = "0.3.37", features = ["local-offset"] }
tokio = { version = "1.42.0", features = ["full"] }
tower = "0.5.1"
tower-http = { version = "0.6.2", features = ["trace"] }
tracing = "0.1.41"
tracing-appender = "0.2.3"
tracing-journald = "0.3.1"
tracing-subscriber = { version = "0.3.19", features = [
"env-filter",
"json",
"time",
] }
[dev-dependencies]
tempdir = "0.3.7"
tempfile = "3.14.0"
serial_test = "3.2.0"
[profile.release]
lto = true # Link Time Optimization
codegen-units = 1 # Maximize size reduction optimizations
opt-level = 3 # Maximum optimization
panic = 'abort' # Remove panic unwinding code
strip = true # Remove debug symbols
[profile.dev]
opt-level = 0 # No optimizations for faster compilation
debug = true # Full debug info
# TODO:
# debug-logging - includes debug logging
# metrics - includes metrics for Prometheus
# tls - adds TLS support
[[bin]]
name = "modbus-relay"
path = "src/main.rs"
[lib]
name = "modbus_relay"
path = "src/lib.rs"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.release]
sign-commit = true
sign-tag = true
pre-release-commit-message = "chore: release {{version}}"
tag-message = "release: {{version}}"
tag-name = "v{{version}}"
[package.metadata.deb]
maintainer = "Artur Wyszyński <[email protected]>"
copyright = "2024, Artur Wyszyński <[email protected]>"
extended-description = """
High-performance Modbus TCP to RTU relay service.
Supports various temperature sensors and provides efficient data relay capabilities.
"""
depends = "$auto"
section = "net"
priority = "optional"
assets = [
[
"target/release/modbus-relay",
"usr/bin/",
"755",
],
[
"config/config.example.yaml",
"etc/modbus-relay/config.yaml",
"644",
],
[
"dist/debian/package/modbus-relay.service",
"lib/systemd/system/modbus-relay.service",
"644",
],
[
"LICENSE-MIT",
"usr/share/doc/modbus-relay/LICENSE-MIT",
"644",
],
[
"LICENSE-APACHE",
"usr/share/doc/modbus-relay/LICENSE-APACHE",
"644",
],
]
conf-files = ["/etc/modbus-relay/config.yaml"]
systemd-units = { unit-name = "modbus-relay" }
maintainer-scripts = "dist/debian/maintainer-scripts"