Skip to content

Commit

Permalink
Convert to workspace project
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Nov 30, 2023
1 parent b233e54 commit 1850789
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 19 deletions.
14 changes: 5 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ name = "hms-mqtt-publish"
version = "0.2.0"
edition = "2021"

[workspace]

[dependencies]
anyhow = "1.0.75"
chrono = "0.4.31"
crc16 = "0.4.0"
env_logger = "0.10.1"
hms2mqtt = { path = "hms2mqtt" }
log = "0.4.20"
protobuf = "3.3.0"
rumqttc = "0.23.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
hostname = "0.3.1"
toml = "0.8.8"
serde_derive = "1.0.193"
anyhow = "1.0.75"

[build-dependencies]
protobuf-codegen = "3.3.0"
toml = "0.8.8"
18 changes: 18 additions & 0 deletions hms2mqtt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "hms2mqtt"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.75"
crc16 = "0.4.0"
log = "0.4.20"
protobuf = "3.3.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_derive = "1.0.193"

[build-dependencies]
protobuf-codegen = "3.3.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs → hms2mqtt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod home_assistant;
pub mod home_assistant_config;
pub mod home_assistant;
pub mod inverter;
pub mod metric_collector;
pub mod mqtt_config;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
mod logging;
mod rumqttc_wrapper;

use hms_mqtt_publish::home_assistant::HomeAssistant;
use hms_mqtt_publish::inverter::Inverter;
use hms_mqtt_publish::metric_collector::MetricCollector;
use hms_mqtt_publish::mqtt_config;
use hms_mqtt_publish::simple_mqtt::SimpleMqtt;
use hms2mqtt::home_assistant::HomeAssistant;
use hms2mqtt::inverter::Inverter;
use hms2mqtt::metric_collector::MetricCollector;
use hms2mqtt::mqtt_config;
use hms2mqtt::simple_mqtt::SimpleMqtt;
use mqtt_config::MqttConfig;
use rumqttc_wrapper::RumqttcWrapper;
use serde_derive::Deserialize;
Expand Down
7 changes: 3 additions & 4 deletions src/rumqttc_wrapper.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use anyhow::Ok;
use hms_mqtt_publish::{
use std::{thread, time::Duration};

use hms2mqtt::{
mqtt_config::MqttConfig,
mqtt_wrapper::{self},
};
use rumqttc::{Client, MqttOptions};
use std::thread;
use std::time::Duration;

pub struct RumqttcWrapper {
client: Client,
Expand Down

0 comments on commit 1850789

Please sign in to comment.