feat(rust): add initial rust template

This commit is contained in:
Reed Krantz
2026-01-12 15:31:13 -06:00
parent 14fb214dad
commit 6c51c7cba0
9 changed files with 817 additions and 0 deletions

32
rust/src/main.rs Normal file
View File

@@ -0,0 +1,32 @@
use clap::Parser;
use tracing::{Level, event};
mod args;
use args::CommandArgs;
mod config;
use crate::args::ActionType;
#[tokio::main]
async fn main() {
let args = CommandArgs::parse();
match &args.action {
ActionType::Serve(serve_args) => {
tracing_subscriber::fmt()
.with_max_level(serve_args.log_level)
.init();
event!(Level::ERROR, "error");
event!(Level::WARN, "warn");
event!(Level::INFO, "info");
event!(Level::DEBUG, "debug");
event!(Level::TRACE, "trace");
println!("{:#?}", args);
// println!("{:#?}", config);
}
}
}