tar

Streaming Rust library for reading and writing TAR archives

Library
Cargo
v0.4.46
742 stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
55 /100 Fair
Development Activity 36
Maintenance 20
Community 76
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
76 /100 Good
Architecture 80
Code Quality 82
Innovation 65
Learning Curve 78

tar is a Rust library for reading and writing TAR archives, built to work over any I/O reader or writer without requiring the whole archive to be resident in memory at once. It does not handle compression itself, leaving callers free to layer gzip, zstd, or other codecs on top via the standard Read/Write traits.

The crate exposes an Archive type for iterating over entries in an existing tar file and a Builder type for constructing new archives entry by entry, along with lower-level Header/Entry types for inspecting or crafting archive metadata such as permissions, ownership, and PAX extended attributes.

What You Get

  • An Archive reader that streams entries one at a time instead of loading the whole file into memory
  • A Builder writer for constructing new TAR archives from files, directories, or in-memory data
  • Full Header and PAX extended-header support for permissions, ownership, and long filenames
  • Generic over any Read/Write implementation, so compression codecs can be layered on top freely
  • Cross-platform path and permission handling for both Unix and Windows archive entries

Common Use Cases

  • Unpacking .tar.gz or .tar.zst release archives after piping through a decompression reader
  • Building deployment or backup archives programmatically from a set of files and directories
  • Streaming very large archives without buffering their entire contents in memory
  • Implementing package-manager or container-image tooling that needs to read/write layer archives
  • Inspecting archive metadata (permissions, ownership, PAX attributes) for security or compliance tooling

Under The Hood

Architecture - The crate is organized around src/archive.rs (streaming reader over entries), src/builder.rs (archive construction), src/entry.rs/src/entry_type.rs (per-entry data and type classification), and src/header.rs (the ~512-byte TAR header format plus GNU/PAX extensions in src/pax.rs). Because it works generically over Read/Write, callers compose it with any I/O source — files, network streams, or in-memory buffers — and any compression layer.

Tech Stack - A dependency-light Rust crate (edition 2021, MSRV 1.63) with a single production dependency, filetime, for cross-platform file-time metadata. Dev-dependencies include tokio/tokio-stream and astral-tokio-tar for testing interoperability with async tar implementations, plus rand and tempfile for fuzz-adjacent and filesystem-based tests. A fuzz/ directory holds cargo-fuzz targets for hardening the header/PAX parsing paths against malformed input.

Code Quality - src/header.rs alone is nearly 1,800 lines, reflecting the accumulated edge cases of the TAR format (GNU long-name extensions, PAX records, sparse files); tests/all.rs and tests/entry.rs exercise reading/writing behavior against a corpus of real-world archives under tests/archives/. The presence of a dedicated fuzz/ target and a REVIEW.md file suggests an unusually deliberate security-review process for a format-parsing library that regularly consumes untrusted input.

API Design - The two-type split (Archive for reading, Builder for writing) keeps the API easy to reason about, and both accept generic I/O types so users aren’t forced into a particular file or compression abstraction. Getting started requires only a couple of lines — open a File, wrap it in Archive::new, and iterate .entries() — with more advanced options (permissions, PAX headers) available but not required for basic use.

Used by 18 apps in this directory

Rust
100%
Other

Meilisearch

Search

59,644

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
67
Dependency
Built with
Rust 100%
Updated 6 days ago
TypeScript
95%
MIT

melty

AI Code Assistants · Code Editors · Developer Tools

5,462

The AI code editor where every chat message is a git commit you can revert, branch, or squash

View details
35
Repo Health
75
Technical
67
Dependency
Built with
TypeScript 95%
Updated 1 years ago
Rust
86%
Apache 2.0

mesh-llm

AI Agents · AI Development

3,551

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
85
Repo Health
91
Technical
69
Dependency
Built with
Rust 86%
TypeScript 10%
Updated 5 days ago
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 3 weeks ago
Rust
87%
Apache 2.0

OpenShell

AI Agents · Developer Tools

18,930

The safe, private runtime that lets autonomous AI agents operate in sandboxed environments governed by declarative YAML policies — blocking data exfiltration, credential leaks, and unauthorized network activity before they happen.

View details
84
Repo Health
81
Technical
67
Dependency
Built with
Rust 87%
Updated 5 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago
Rust
66%
Apache 2.0

Temps

Analytics · Devops · Monitoring

865

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
66
Dependency
Built with
Rust 66%
TypeScript 33%
Updated 6 days ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,441

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
72
Repo Health
75
Technical
63
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 1 months ago
TypeScript
95%
Apache 2.0

Void

AI Code Assistants · Automation · Code Editors

28,733

Open-source AI code editor with direct LLM integration and data privacy

View details
44
Repo Health
84
Technical
68
Dependency
Built with
TypeScript 95%
Updated 4 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers