ð Overview
It's a focused, "no-frills" alternative to robust archiving crates like
tar-rs. In a world of feature-heavy libraries, this crate carves out a niche for
developers who need exactly two things: packing a directory and unpacking a bundle,
with the best-in-class compression provided by Zstd.
It was engineered for automated deployment systems, log rotators, and payload delivery mechanisms where build times, binary size, and execution speed are more important than supporting legacy formats or cross-platform edge cases.
âĻ Key Features
-
Unix-Native Core
Leverages Unix-specific traits for handling file permissions (mode) and metadata, ensuring fidelity on Linux/BSD. -
Zstd-Centric
Unlike other libraries that treat compression as an afterthought,tar_minimalwas primarily designed around Zstd streams. -
Safety First
Built-in protection against Path Traversal attacks during extraction. -
Lean Dependency Tree
Zero bloat. We avoid heavy crates like walkdir or complex async runtimes by default.
â ïļ Scope & Critical Limitations
This library is highly specialized. To maintain its "minimalist" status, we explicitly chose not to implement certain features:
-
No Random Access / Listing
You cannot list files or read a single file from the archive. It's a "stream-in" (Builder) or "stream-out" (Decoder) architecture. -
No Windows Support
While it might compile, file permissions and path handling are not guaranteed or tested on Windows. -
Verified Multi-Format Streaming
While primarily designed for Zstd, the library is fully compatible and verified with any Write/Read stream, including Gzip, Xz, Bzip2, Lz4, and Brotli via the standard USTAR format. -
Basic Metadata Only
We handle standard permissions (UID/GID/Mode/MTime), but we do not support extended attributes (xattrs), ACLs, or complex PAX headers. -
No In-Place Updates
Archives are immutable once created. You cannot append or delete files from an existing.tar.zstbundle.
ð Usage Example
[]
= "1.0"
= "0.13"
ð Creating an Archive/Bunble (TAR + Zstd)
use Builder;
use Encoder;
use File;
ðĪ Extracting an Archive/Bunble
use Decoder;
use Decoder as ZstdDecoder;
use File;
ðĪ Contributing
We welcome contributions, but we are very protective of the library's scope. Please follow these guidelines carefully.
â What we are looking for
-
Security Audits
Improvements to theDecoderto prevent zip-slip vulnerabilities, path traversal issues, and symlink-based attacks. -
Stability & Robustness
Fixes for I/O edge cases, error handling, and buffer management. -
Zstd Performance Tuning
Optimizations in how TAR blocks are streamed into Zstd frames for better compression ratios and throughput. -
Documentation Enhancements
Clearer examples, improved explanations, and more actionable error messages.
ð§ Optional & Feature-Gated Enhancements
The core functionality of tar_minimal will remain strictly minimal and
dependency-light. However, non-essential capabilities may be accepted
behind optional Cargo feature flags, allowing advanced users to extend
behavior without impacting the default experience.
-
Possible feature-gated additions include:
-
Platform-Specific Behavior
Optional compatibility layers for non-Unix systems (such as Windows), implemented in isolation to avoid polluting the Unix-focused core. -
Extended Metadata Support
Optional handling of xattrs, ACLs, and PAX headers for users who need richer filesystem fidelity. -
Performance Helpers & Utilities Enhancements that may introduce extra dependencies for speed, parallelism, or buffering strategies.
-
-
All optional features must:
-
Be disabled by default
The base crate must remain lean and predictable. -
Preserve a minimal dependency tree
No heavy crates unless absolutely necessary and clearly justified. -
Maintain core security guarantees
Optional functionality must not weaken extraction safety or validation logic.
-
ðŠķ Design Philosophy (Feature-Based Expansion)
To preserve the minimalist nature of tar_minimal:
-
The core remains Unix + Zstd focused
This is the guaranteed, stable, and optimized path. -
All expanded functionality lives behind Cargo features
No hidden dependencies or surprise behaviors. -
Users only pay for what they enable
Both in compile time and dependency complexity.
This ensures the crate scales from ultra-lightweight tooling to more advanced use cases without compromising its original goals.
âïļ Optional Features â Outside the Core Scope
Functionality beyond the minimal archive pipeline may be considered if:
-
It is cleanly isolated from the core logic
Clear module boundaries and no cross-contamination. -
It does not bloat default builds
The zero-feature experience must remain fast and small. -
It follows Rust feature best practices
Predictable flags, no implicit enables, and clear documentation.
ð MIT License
This repository has scripts that were created to be free software.
Therefore, they can be distributed and/or modified within the terms of the MIT License.
See the LICENSE file for details.
ðŽ Contact & Support
- ð§ Email: m10ferrari1200@gmail.com
- ð§ Email: contatolinuxdicaspro@gmail.com