#![allow(dead_code)]
#![cfg_attr(all(target_arch = "wasm32", target_os = "wasi"), feature(wasi_ext))]
#![cfg_attr(
all(target_arch = "wasm32", target_os = "wasi"),
feature(async_fn_in_trait)
)]
#![cfg_attr(all(target_arch = "wasm32", target_os = "wasi"), feature(stdsimd))]
mod application;
use application::Application;
mod domain;
mod infrastructure;
pub use infrastructure::config::{self, Cfg};
use infrastructure::instrumentation::Instruments;
use infrastructure::storage::FSStorage;
use tracing::info;
pub async fn launch_wasmio(cfg: Cfg) -> anyhow::Result<()> {
let _ = Instruments::new();
info!("Starting the process");
let storage = FSStorage::new(cfg.storage.path);
let app = Application::new(storage).serve(cfg.bind_addr);
app.await??;
info!("Ending the process");
Ok(())
}