| Crates.io | qrustcp |
| lib.rs | qrustcp |
| version | 2.0.0 |
| created_at | 2025-10-17 18:09:26.215368+00 |
| updated_at | 2025-10-22 18:41:46.419105+00 |
| description | WLAN File sharing made easy |
| homepage | https://gitlab.com/comodino/qrustcp |
| repository | https://gitlab.com/comodino/qrustcp |
| max_upload_size | |
| id | 1888065 |
| size | 93,137 |
Thought that I should implement my version of qrcp just because I really don't like go.
What language wold best fit this task? Rust of course! Why?
This is also my first crate, so don't be too harsh on it ;)
I know it isn't that safe, but who is going to hack you on your local network anyway? (If someone actually does you have way worse problems than my crate to worry about)
# stable
cargo install qrustcp
# git
cargo install --git https://gitlab.com/comodino/qrustcp.git --branch master
The CLI supports two commands:
send, to send one or multiple filesreceive, to receive one or multiple filesThey both have subcommands:
pub struct SendArgs {
/// Files to send
#[arg(required = true)]
pub files: Vec<PathBuf>,
/// Compression format
#[arg(short, long, default_value = "bz2")]
pub compression: CompressionFormat,
/// Port to use (random if not specified)
#[arg(short, long)]
pub port: Option<u16>,
/// Don't show QR code
#[arg(long)]
pub no_qr: bool,
/// Timeout in seconds (default: no timeout)
#[arg(short, long)]
pub timeout: Option<u64>,
}
pub struct ReceiveArgs {
/// Output directory for received files
#[arg(short, long, default_value = ".")]
pub output: PathBuf,
/// Compression format for multiple files
#[arg(short, long, default_value = "bz2")]
pub compression: CompressionFormat,
/// Port to use (random if not specified)
#[arg(short, long)]
pub port: Option<u16>,
/// Don't show QR code
#[arg(long)]
pub no_qr: bool,
/// Timeout in seconds (default: no timeout)
#[arg(short, long)]
pub timeout: Option<u64>,
}
When ran it tries to create open a server with an endpoint in the local network.
The webapp is embedded in the code, which
is a clever way to make it faster, while
also being a terrible way of editing it.
(All the HTML/CSS/JS code is AI generated)
If it succeds then it will try to either locate the files supplied and proceed to compress them before sending them out, or wait for a connection and compress then download the files uploaded.
When uploading/downloading multiple files
they are compressed by default, using bz.
One can choose not to show the QR code.
General usage:
# send file(s)
qrustcp send [ -c, --compression { gz, bz, xz, zip } ] [FILE...]
# receive file(s)
qrustcp receive [ -c, --compression { gz, bz, xz, zip } ] [ -o, --output <outname> ]
Common examples: Send
qrustcp send FILES -c xz # compresses files into an xz archive and send it
qrustcp send FILE # sends file with no compression by default
qrustcp send FILES -c bundle # bundles files into a tar archive and send it
Receive
qrustcp receive -c xz # compresses uploaded files into an xz archive and downloads it
qrustcp receive FILE # receives a single file with no compression by default
qrustcp receive FILES -c bundle # bundles uploaded files into a tar archive and saves it
cargo build # debug build
cargo build --release # release build