-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
45 lines (35 loc) · 1.26 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
[package]
name = "sds011-exporter"
version = "0.1.0"
authors = ["Tim Buckley <[email protected]>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# base requirements
serialport = "3.3"
bytes = "0.5"
err-derive = "0.2"
log = "0.4"
# requirements for all bins
anyhow = { version = "1.0", optional = true }
env_logger = { version = "0.7", optional = true }
structopt = { version = "0.3", optional = true }
chrono = { version = "0.4", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true}
serde_json = { version = "1.0", optional = true }
# requirements for exporter
warp = { version = "0.2", optional = true }
tokio = { version = "0.2", features = ["macros"], optional = true }
simple-prometheus-exporter = { git = "https://github.com/timothyb89/simple-prometheus-exporter-rs", tag = "v0.1.0", optional = true }
[features]
default = []
bin = ["anyhow", "env_logger", "structopt", "chrono", "serde", "serde_json"]
exporter = ["warp", "tokio", "simple-prometheus-exporter"]
[[bin]]
name = "sds011-exporter"
path = "src/bin/sds011_exporter.rs"
required-features = ["bin", "exporter"]
[[bin]]
name = "sds011-tool"
path = "src/bin/sds011_tool.rs"
required-features = ["bin"]