tar

Streaming Rust library for reading and writing TAR archives

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

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
61/100Good
Development Activity52
Maintenance28
Community76
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture80
Code Quality82
Innovation65
Learning Curve78

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 16 apps in this directory

TypeScript
51%
MIT

Anarlog

Note Taking · AI Assistants · Productivity

9,087

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
69
Dependency
Built with
TypeScript51%
Rust38%
Updated today
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
68
Dependency
Built with
C++69%
Python13%
Updated today
Rust
69%
Other

GitButler

Developer Tools · Devops · AI Development

21,531

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Rust69%
TypeScript18%
Svelte12%
Updated today
Rust
89%
Apache 2.0

Graphite

Code Editors · Design Tools

26,876

A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.

View details
84
Repo Health
77
Technical
70
Dependency
Built with
Rust89%
Updated today
Rust
57%
MIT

Handy

Productivity

29,916

Free, offline, open-source speech-to-text that pastes directly into any app on Windows, macOS, and Linux.

View details
87
Repo Health
78
Technical
73
Dependency
Built with
Rust57%
TypeScript31%
Updated today
Rust
72%
Other

iii

Developer Tools · Devops

18,604

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
86
Repo Health
85
Technical
69
Dependency
Built with
Rust72%
TypeScript17%
Updated yesterday
TypeScript
75%
Other

Jan

AI Assistants

44,052

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
66
Dependency
Built with
TypeScript75%
Rust21%
Updated today
Rust
47%
MIT

Kuku

Note Taking

204

A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.

View details
73
Repo Health
67
Technical
68
Dependency
Built with
Rust47%
TypeScript40%
Updated 1 months ago
Rust
100%
Other

Meilisearch

Search

59,012

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

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days 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

Search