Skip to content

rayylee/mwget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📥 mwget

A high-performance, multi-threaded wget implementation written in Rust.

mwget (🧵 multi-threaded wget) is a fast and efficient command-line download tool built in Rust. It is designed for high-speed downloading of large files by utilizing multiple concurrent HTTP connections.

While remaining largely compatible with the familiar usage of GNU wget, mwget dramatically improves download speeds — often achieving 2x to 10x 🚀 faster performance compared to single-threaded tools, especially when downloading large files such as ISO images, software packages, or video files.

Performance Benchmarks

The following table shows the download time (in milliseconds) for different file sizes using three download tools: mwget, wget, and curl.

Size mwget wget curl
small 2538 10232 10231
mid 12792 51254 51310
large 51335 205279 205341

Performance Analysis: On average, mwget achieves approximately 4x faster download speeds (300% improvement⚡) compared to wget and curl across all file sizes. Benchmark data generated by benchmarks/run.sh.

Installation

From Source (Direct)

git clone <repository-url>
cd mwget
cargo build --release

The compiled binary will be available at target/release/mwget.

Using Makefile

# Build the project
make build

# Install to /usr/local/bin
make install

# Uninstall
make uninstall

The compiled binary will be available at target/x86_64-unknown-linux-gnu/release/mwget.

Usage

Basic usage is similar to wget:

# Download a file
mwget https://example.com/file.zip

# Use 8 concurrent connections
mwget -n 8 https://example.com/large-file.iso

Development

# Build
cargo build

# Build with release optimizations
cargo build --release

# Run with debug output
RUST_LOG=debug cargo run -- <url>

# Run tests
cargo test

# Code quality checks
cargo clippy
cargo fmt

Makefile Targets

Target Description
make setup Install Rust target
make build Build binary for the target
make package Create distribution tar.gz package
make install Install binary to /usr/local/bin
make uninstall Remove binary from /usr/local/bin
make clean Clean build artifacts
make test Run fmt check, clippy, and cargo tests
make run Build and run with --help
make release Full release preparation (clean + package)
make info Show build information
make help Show all available targets

Building for Different Targets

# Build for musl (static linking friendly)
make build TARGET=x86_64-unknown-linux-musl

# Build for current system
make build TARGET=x86_64-unknown-linux-gnu

Acknowledgments

This project is inspired by and builds upon the work of several excellent open-source projects:

  • GNU wget - The original GNU wget project that has been the gold standard for command-line downloading for decades
  • mwget C++ - The C++ implementation of multi-threaded wget that demonstrated the performance benefits of concurrent downloads

Thank you to all the developers and maintainers of these projects for their invaluable contributions to the open-source community.

About

A high-performance, multi-threaded wget implementation written in Rust.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors