Crates.io | udpexchange |
lib.rs | udpexchange |
version | 0.1.1 |
source | src |
created_at | 2023-10-03 23:42:40.88884 |
updated_at | 2023-10-18 18:57:18.560109 |
description | Small CLI tool for creating simple UDP hubs; small executable size experiment |
homepage | |
repository | https://github.com/vi/udpexchange |
max_upload_size | |
id | 991663 |
size | 11,341 |
This program follows the following algorithm:
Optionally, it can remember some recent messages and send them to newly seen clients.
This service may allow DDoS amplification, so should not be run publicly.
This project is partly an experiment to create small executables using Rust while having (partial?) access to libstd and using reasonable command-line arguments parser.
cargo build --release -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort --target=x86_64-unknown-linux-musl --features=mini
should produce a working 51-kilobyte executable.
Note that hacks activated by --features=mini
may be unsound and less portable. Even smaller size is attainable by also using eyra.
Download a pre-built executable from Github releases or install from source code with cargo install --path .
or cargo install udpexchange
.
Usage: udpexchange <listen_addr> [-t <timeout>] [-r]
Simple UDP service which replies to all other known clients
Positional Arguments:
listen_addr socket address to bind UDP to
Options:
-t, --timeout timeout, in seconds, to expire clients.
-r, --replay send recent accumulated messages to newly seen clients
--help display usage information