feat: initialize project structure, modules and configurations

This commit is contained in:
0xcathiefish
2026-05-30 08:38:18 +00:00
commit aa80ac21ee
15 changed files with 778 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
use anyhow::Result;
use nosync::{ModuleA, ModuleB};
use tracing::info;
use tracing_subscriber::{EnvFilter, FmtSubscriber};
#[tokio::main]
async fn main() -> Result<()> {
// Configure simple standard output logging
let subscriber = FmtSubscriber::builder()
.with_env_filter(EnvFilter::new("info"))
.finish();
tracing::subscriber::set_global_default(subscriber)
.map_err(|e| anyhow::anyhow!("failed to set global tracing subscriber: {e}"))?;
info!("--- Running nosync library example ---");
// Construct the structs and execute the logic
let processor = ModuleA::new("example-processor".to_string())?;
let orchestrator = ModuleB::new(processor)?;
orchestrator.run().await?;
info!("--- Example execution completed successfully ---");
Ok(())
}