Eru is a small multi-threaded file downloader written in C++. It splits the target file into chunks, fetches them in parallel over HTTP/HTTPS with libcurl, and stitches the result back together. It also downloads BitTorrent magnet links and .torrent files using aria2. I built it because I wanted IDM-like behaviour without paying for IDM or pirating it.
On Linux and macOS, libaria2 is compiled straight into the binary, so torrent support is fully self-contained. On Windows, Eru shells out to an external aria2c binary (choco install aria2).
- Multi-threaded HTTP/HTTPS downloading
- BitTorrent support via magnet links and
.torrentfiles (powered by aria2) - Progress bar with real-time updates
- Automatic filename detection from URL
- Customizable number of download threads
- Displays download speed and estimated time remaining
- Automatic merging of downloaded chunks
- C++17 compatible compiler
- CMake 3.16 or higher
- Nodus
0.0.1-alphaor newer - To embed torrent support (Linux/macOS): autoconf, automake, libtool, pkg-config, gettext, plus OpenSSL and zlib headers — used to build the bundled
libaria2from source - Windows only: aria2 installed at runtime for torrent/magnet downloads
Eru's CMake dependencies are declared in nodus.toml and locked in
cmake/nodus/package-lock.cmake. Nodus uses CPM.cmake to acquire CPR, CLI11,
and indicators; no manual libcurl installation is required for that path.
-
Clone the repository:
git clone https://github.com/Dank-del/eru.git cd eru -
Install the locked source dependencies:
nodus install -
Configure the project with CMake:
cmake -S . -B build -
Build the project:
cmake --build build
On Linux/macOS, omit no options to build embedded aria2 support. To build only the HTTP downloader while setting up the project, use:
cmake -S . -B build -DERU_EMBED_ARIA2=OFF
Eru statically links the GNU runtime by default. If your distribution does not
provide the static libstdc++ archive, configure with
-DERU_STATIC_RUNTIME=OFF instead.
After building, you can run Eru using the following command:
./src/eru --url <download_url_or_magnet_or_torrent> [options]
Eru auto-detects the source type: magnet: links and paths ending in .torrent are downloaded over BitTorrent, everything else over HTTP/HTTPS.
-u, --url <url>: URL to download, amagnet:link, or a path to a.torrentfile (required)-o, --output <path>: Output filename for HTTP downloads, or the save directory for torrents (optional)-t, --threads <number>: Number of download threads for HTTP (default: 4; ignored for torrents)-a, --about: Display information about Eru-h, --help: Show help message
-
Download a file using default settings:
./src/eru --url https://example.com/large_file.zip -
Download a file with a custom output name and 8 threads:
./src/eru --url https://example.com/large_file.zip --output my_file.zip --threads 8 -
Download a magnet link into a folder:
./src/eru --url "magnet:?xt=urn:btih:..." --output ./downloads -
Download from a local
.torrentfile:./src/eru --url ./ubuntu.torrent --output ./downloads -
Display information about Eru:
./src/eru --about
Pull requests welcome.
MIT. See LICENSE.
Sayan Biswas
- Email: me@sayanbiswas.in
- CPR for HTTP requests
- CLI11 for command-line parsing
- indicators for progress bars
- aria2 for BitTorrent downloads