mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
Add command-line option for printing version and commit info
This commit is contained in:
parent
bdc719b755
commit
f5b1cd5525
14 changed files with 79 additions and 5 deletions
|
|
@ -23,6 +23,7 @@ use common::{ConnectedRequestSender, ConnectedResponseSender, SocketWorkerIndex,
|
|||
use crate::common::RequestWorkerIndex;
|
||||
|
||||
pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker";
|
||||
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
pub fn run(config: Config) -> ::anyhow::Result<()> {
|
||||
let state = State::new(config.request_workers);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|||
fn main() {
|
||||
aquatic_cli_helpers::run_app_with_cli_and_config::<aquatic_udp::config::Config>(
|
||||
aquatic_udp::APP_NAME,
|
||||
aquatic_udp::APP_VERSION,
|
||||
aquatic_udp::run,
|
||||
None,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue