Project scaffolding

This commit is contained in:
Daniel Lundin 2024-11-23 19:57:17 +01:00
parent 7b273c7245
commit af28c60984
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
14 changed files with 1596 additions and 66 deletions
controller

17
controller/Cargo.toml Normal file
View file

@ -0,0 +1,17 @@
[package]
name = "patagia-controller"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
[dependencies]
anyhow.workspace = true
clap.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-chrome.workspace = true
tracing-subscriber.workspace = true
[[bin]]
name = "patagia-controller"
doc = false

24
controller/src/main.rs Normal file
View file

@ -0,0 +1,24 @@
use anyhow::Result;
use clap::Parser;
use tokio::time::{sleep, Duration};
use tracing_subscriber::prelude::*;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Cli {}
#[tokio::main]
async fn main() -> Result<()> {
let _args = Cli::parse();
let fmt_layer = tracing_subscriber::fmt::layer();
tracing_subscriber::registry()
.with(tracing_subscriber::EnvFilter::from_default_env())
.with(fmt_layer)
.init();
tracing::info!("Patagia Controller");
sleep(Duration::from_secs(3)).await;
Ok(())
}