You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
968 B
63 lines
968 B
#![cfg_attr(nightly, feature(never_type))]
|
|
#![feature(entry_insert)]
|
|
|
|
#![allow(dead_code)]
|
|
#![allow(unused_imports)]
|
|
|
|
#[macro_use] extern crate log;
|
|
|
|
use jemallocator::Jemalloc;
|
|
|
|
#[global_allocator]
|
|
static GLOBAL: Jemalloc = Jemalloc;
|
|
|
|
use color_eyre::{
|
|
eyre::{
|
|
self, eyre,
|
|
WrapErr as _,
|
|
},
|
|
SectionExt as _,
|
|
Help as _,
|
|
};
|
|
use futures::{
|
|
prelude::*,
|
|
};
|
|
use lazy_static::lazy_static;
|
|
use getrandom::getrandom;
|
|
use smallmap::smallmap;
|
|
use serde::{
|
|
Serialize,
|
|
Deserialize,
|
|
};
|
|
|
|
fn install() -> eyre::Result<()>
|
|
{
|
|
color_eyre::install()?;
|
|
pretty_env_logger::init();
|
|
|
|
trace!("init oke");
|
|
Ok(())
|
|
}
|
|
|
|
mod cache;
|
|
mod ext;
|
|
use ext::*;
|
|
mod util;
|
|
|
|
mod conv;
|
|
|
|
mod args;
|
|
|
|
#[cfg(feature="server")] mod server;
|
|
#[cfg(feature="client")] mod client;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> eyre::Result<()> {
|
|
install()
|
|
.wrap_err(eyre!("Failed to install handlers"))?;
|
|
|
|
//TODO: Parse args and delegate to client or server
|
|
|
|
Ok(())
|
|
}
|