Skip to content

downloader.zigHigh-Performance HTTP/HTTPS Downloads

A production-ready Zig library for downloading files with streaming, progress, resume, and retry support.

downloader.zig

Quick Start

Add to your build.zig.zon:

bash
zig fetch --save https://github.com/muhammad-fiaz/downloader.zig/archive/refs/tags/0.0.1.tar.gz

Then use in your code:

zig
const std = @import("std");
const downloader = @import("downloader");

pub fn main() !void {
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};
    defer _ = gpa.deinit();
    const allocator = gpa.allocator();

    // Simple one-liner download
    try downloader.download(
        allocator,
        "https://example.com/file.zip",
        "file.zip"
    );
}

Why downloader.zig?

Featuredownloader.zigcurl bindingsCustom HTTP
Pure Zig
No Dependencies
Resume SupportManualManual
Progress CallbackManual
Retry Logic✅ Built-inManualManual
Smart File Naming✅ (1), (2)Manual
Thread Safe✅ Per-clientVariesManual

Supported Platforms

PlatformArchitecturesStatus
Windowsx86_64 (64-bit), x86 (32-bit)✅ Full support
Linuxx86_64, x86, aarch64, arm, riscv64✅ Full support
macOSx86_64 (Intel), aarch64 (Apple Silicon)✅ Full support
FreeBSDx86_64✅ Full support
FreestandingVarious⚠️ Build only

Sponsors

If you find this library useful, please consider sponsoring!

Released under the MIT License.