# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "sunsniff" version = "0.3.2" authors = ["Bruce Merry"] description = "Intercept and store telemetry from a Sunsynk inverter" readme = "README.md" license = "GPL-3.0-or-later" repository = "https://github.com/bmerry/sunsniff" [package.metadata.cross.build] pre-build = [ "set -e", "apt-get update && apt-get install -y flex bison dpkg-dev", "cd /tmp", "curl https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz | tar -zx", "cd libpcap-1.10.4", "arch=\"$(dpkg-architecture -A $CROSS_DEB_ARCH -q DEB_TARGET_GNU_TYPE)\"", "if ! which ${arch}-gcc; then arch=\"$(./config.sub $arch)\"; fi", "./configure --host \"$arch\" --disable-shared LDFLAGS=\"-static\"", "make", "make install", ] [profile.release] lto = true strip = true [dependencies.async-std] version = "1.12.0" [dependencies.async-trait] version = "0.1.57" [dependencies.chrono] version = "0.4.22" features = ["std"] default-features = false [dependencies.chrono-tz] version = "0.8.2" features = ["serde"] optional = true [dependencies.clap] version = "4.0.10" features = ["derive"] [dependencies.env_logger] version = "0.10.0" [dependencies.etherparse] version = "0.13.0" optional = true [dependencies.futures] version = "0.3.28" [dependencies.influxdb2] version = "0.4.0" features = ["rustls"] optional = true default_features = false [dependencies.log] version = "0.4.17" [dependencies.modbus-robust] version = "0.1.0" optional = true [dependencies.mqtt-async-client] version = "0.3.1" optional = true [dependencies.pcap] version = "1.0.0" features = ["capture-stream"] optional = true [dependencies.serde] version = "1.0.159" features = ["derive"] [dependencies.serde_json] version = "1.0.95" optional = true [dependencies.serde_with] version = "3.2.0" optional = true [dependencies.tokio] version = "1.21.2" features = [ "macros", "rt", ] [dependencies.tokio-modbus] version = "0.9.0" features = [ "rtu", "tcp", ] optional = true default-features = false [dependencies.tokio-serial] version = "5.4.4" optional = true [dependencies.toml] version = "0.7.3" [dev-dependencies.assert_approx_eq] version = "1.1.0" [build-dependencies.csv] version = "1.2.1" [build-dependencies.serde] version = "1.0.159" features = ["derive"] [features] default = [ "influxdb2", "mqtt", "modbus", "pcap", ] modbus = [ "dep:modbus-robust", "dep:serde_with", "dep:tokio-modbus", "dep:tokio-serial", "chrono/clock", "tokio/time", ] mqtt = [ "dep:mqtt-async-client", "dep:serde_json", ] pcap = [ "dep:chrono-tz", "dep:etherparse", "dep:pcap", ]