qrustcp

Crates.ioqrustcp
lib.rsqrustcp
version2.0.0
created_at2025-10-17 18:09:26.215368+00
updated_at2025-10-22 18:41:46.419105+00
descriptionWLAN File sharing made easy
homepagehttps://gitlab.com/comodino/qrustcp
repositoryhttps://gitlab.com/comodino/qrustcp
max_upload_size
id1888065
size93,137
Comodino (llComodino)

documentation

README

QRustCP ( qr-rust-copy | crust-copy )

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?

  • It's blazing fast
  • It's safe
  • Other justific-VALID REASONS ... There isn't much more to it.

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)


Installation

# stable
cargo install qrustcp

# git
cargo install --git https://gitlab.com/comodino/qrustcp.git --branch master

How it works

The CLI supports two commands:

  • send, to send one or multiple files
  • receive, to receive one or multiple files

They both have subcommands:

Send arguments

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>,
}

Receive arguments

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.


Usage

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

Building (is this even necessary?)

cargo build # debug build
cargo build --release # release build
Commit count: 0

cargo fmt