Files
tuwunel/src/main/main.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
504 B
Rust
Raw Normal View History

#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use std::sync::atomic::Ordering;
use tuwunel::{Server, args, restart, runtime};
use tuwunel_core::{Result, debug_info};
fn main() -> Result {
let args = args::parse();
let runtime = runtime::new(Some(&args))?;
let server = Server::new(Some(&args), Some(runtime.handle()))?;
tuwunel::exec(&server, runtime)?;
#[cfg(unix)]
if server.server.restarting.load(Ordering::Acquire) {
restart::restart();
}
debug_info!("Exit");
Ok(())
}