mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-08-01 08:10:21 -07:00
- adds TOML based configuation files - with example configuratios in config-examples - reimplments arcane CLI argument parser as automaton - adds a new CLI focused arround configuration files - moves all file utility stuff from `main.rs` to `util.rs` - moves all AppServer stuff to dedicated `app_server.rs` - add mio for multi-listen-socket support (should fix #27) - consistency: rename private to secret
16 lines
350 B
Rust
16 lines
350 B
Rust
use log::error;
|
|
use rosenpass::{cli::Cli, sodium::sodium_init};
|
|
use std::process::exit;
|
|
|
|
/// Catches errors, prints them through the logger, then exits
|
|
pub fn main() {
|
|
env_logger::init();
|
|
match sodium_init().and_then(|()| Cli::run()) {
|
|
Ok(_) => {}
|
|
Err(e) => {
|
|
error!("{e}");
|
|
exit(1);
|
|
}
|
|
}
|
|
}
|