From 14d51c0df62562e26218ac7357e022938fe02543 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Fri, 17 Oct 2025 02:57:18 +0200 Subject: [PATCH] Move main.rs to bin/automation.rs --- src/{main.rs => bin/automation.rs} | 13 ++++--------- src/lib.rs | 4 ++++ 2 files changed, 8 insertions(+), 9 deletions(-) rename src/{main.rs => bin/automation.rs} (96%) create mode 100644 src/lib.rs diff --git a/src/main.rs b/src/bin/automation.rs similarity index 96% rename from src/main.rs rename to src/bin/automation.rs index fb43ff2..155947d 100644 --- a/src/main.rs +++ b/src/bin/automation.rs @@ -1,14 +1,14 @@ #![feature(iter_intersperse)] -mod config; -mod secret; -mod version; -mod web; use std::net::SocketAddr; use std::path::Path; use std::process; use ::config::{Environment, File}; +use automation::config::{Config, Setup}; +use automation::secret::EnvironmentSecretFile; +use automation::version::VERSION; +use automation::web::{ApiError, User}; use automation_lib::device_manager::DeviceManager; use axum::extract::{FromRef, State}; use axum::http::StatusCode; @@ -18,11 +18,6 @@ use google_home::{GoogleHome, Request, Response}; use mlua::LuaSerdeExt; use tokio::net::TcpListener; use tracing::{debug, error, info, warn}; -use web::{ApiError, User}; - -use crate::config::{Config, Setup}; -use crate::secret::EnvironmentSecretFile; -use crate::version::VERSION; // Force automation_devices to link so that it gets registered as a module extern crate automation_devices; diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..49e787e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,4 @@ +pub mod config; +pub mod secret; +pub mod version; +pub mod web;