add aquatic crate with master executable, refactor cli_helpers

This commit is contained in:
Joakim Frostegård 2020-08-13 00:13:01 +02:00
parent c69b09ab9c
commit 9efc1fc66a
17 changed files with 243 additions and 62 deletions

View file

@ -4,7 +4,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn main(){
aquatic_cli_helpers::run_app_with_cli_and_config::<aquatic_udp::config::Config>(
"aquatic: udp bittorrent tracker",
aquatic_udp::APP_NAME,
aquatic_udp::run,
None
)
}

View file

@ -15,6 +15,9 @@ use config::Config;
use common::State;
pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker";
pub fn run(config: Config) -> ::anyhow::Result<()> {
let state = State::default();