Python bindings for rars RAR archive toolkit
Project description
rars
A Rust implementation of RAR.
Current Status
rars covers the RAR lineage from early RE~^ archives through RAR 7,
compression and decompression. It's not fast, but it works. ish.
Rust API
Use the rars crate for Rust applications and libraries. The lower-level
rars-format, rars-codec, rars-crypto, rars-crc32, and rars-recovery
crates are deprecated as standalone dependencies; they remain implementation
details for this release and are planned to be folded into rars.
CLI
Inspect, test, and extract archives:
rars info archive.rar
rars test archive.rar
rars x archive.rar out/
Create archives with specific RAR generation:
rars a --format rar29 archive.rar files...
rars a --format rar50 --solid --auto-filter archive.rar files...
rars a --format rar70 --store --volume-size 10m archive.part1.rar files...
The writer supports stored and compressed members, split volumes, passwords,
header encryption where implemented, comments, RARVM filters, RAR5 quick-open
records, and supported recovery records. Run rars --help for the exact option
set.
Fast Builds
The optional fast feature enables safe portable SIMD paths for selected hot
compression and decompression helpers, including LZ match scanning, x86 filter
scanning, and CRC-32 updates. It uses Rust's experimental std::simd API, so it
requires a nightly toolchain. Default builds do not enable this feature and
remain stable-compatible.
Build or run the CLI with the fast path:
cargo +nightly run -p rars-cli --features fast -- info archive.rar
cargo +nightly build --workspace --features fast
Run the fast test and benchmark paths:
cargo +nightly test --workspace --features fast
cargo +nightly bench -p rars-codec --bench chunk_sizes --features fast
Parallel Builds
The optional parallel feature enables Rayon worker threads for independent
archive members. It parallelizes non-solid compression planning for supported
writers and buffered extraction of non-solid, non-split single archives while
preserving archive order for output. Solid archives and multivolume extraction
fall back to the existing sequential stream because their codec state depends on
member order.
Build or run the CLI with parallel workers:
cargo run -p rars-cli --features parallel -- --threads 4 a --format rar50 archive.rar files...
cargo run -p rars-cli --features parallel -- x --threads 4 archive.rar out/
cargo test --workspace --features parallel
Measure parallel archive-member work with Criterion:
cargo bench -p rars-format --bench parallel --features parallel
cargo +nightly bench -p rars-format --bench parallel --features fast,parallel
The parallel benchmark reports 1_thread and all_threads_N cases for RAR5
multi-member compression and extraction.
When --threads is omitted, rars uses all available cores. Passing
--threads to a CLI built without parallel is rejected.
Python bindings
The workspace includes PyO3 bindings packaged as the rars Python module for
Python 3.10 and newer. The default Python build enables the Rust parallel
feature; the optional fast feature is available for nightly Rust builds only
because it relies on std::simd.
maturin develop
RUSTUP_TOOLCHAIN=nightly maturin develop --features fast
The Python API exposes a rarfile-style RarFile for listing, reading,
testing, and extracting archives, plus RarBuilder for creating or rewriting
archives. Rewrites are staged into a new archive; existing RAR files are not
edited in place.
Development
Run the test suite:
cargo test --workspace --all-targets
Generate a local coverage report:
rustup component add llvm-tools-preview
./scripts/coverage.py
The script prints a line-coverage summary, saves it to
target/coverage/summary.txt, and writes HTML output to
target/coverage/html/library/index.html and target/coverage/html/cli/index.html.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rars-0.3.2.tar.gz.
File metadata
- Download URL: rars-0.3.2.tar.gz
- Upload date:
- Size: 4.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bab67010ab85f3f010a6603187c356a0d5f24fc16a4b7e1c719b5f50cab4650
|
|
| MD5 |
e0d7988f8450036930e215011f2b50c4
|
|
| BLAKE2b-256 |
7bddc2a7ceb350cfc624bbfcc87a824b2ed06aaa53976a304d0da26c8b04a89b
|
Provenance
The following attestation bundles were made for rars-0.3.2.tar.gz:
Publisher:
release.yml on bitplane/rars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rars-0.3.2.tar.gz -
Subject digest:
5bab67010ab85f3f010a6603187c356a0d5f24fc16a4b7e1c719b5f50cab4650 - Sigstore transparency entry: 2021319206
- Sigstore integration time:
-
Permalink:
bitplane/rars@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/bitplane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Trigger Event:
push
-
Statement type:
File details
Details for the file rars-0.3.2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: rars-0.3.2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 893.5 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89efcf1b3aa5987db5af8f697f7c9b1eff4135df17fff45f6b122611dfca4ace
|
|
| MD5 |
a93ba1f22724e737d3c6a18bdb42128f
|
|
| BLAKE2b-256 |
29a13b48246337ef69ccffd9119d59a00fb9b72d57f1143406a3efc182823678
|
Provenance
The following attestation bundles were made for rars-0.3.2-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on bitplane/rars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rars-0.3.2-cp310-abi3-win_amd64.whl -
Subject digest:
89efcf1b3aa5987db5af8f697f7c9b1eff4135df17fff45f6b122611dfca4ace - Sigstore transparency entry: 2021319345
- Sigstore integration time:
-
Permalink:
bitplane/rars@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/bitplane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Trigger Event:
push
-
Statement type:
File details
Details for the file rars-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rars-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7cc6c583bd926ed8b379a94e868b6d250ae197223223966975b294e33ce9f3
|
|
| MD5 |
ecd07cd1a313d631269a820c80e0bfad
|
|
| BLAKE2b-256 |
73d9081f8a0a8cf305f27f2d79c4217a964749e473ed012834ea23f46f2d31cc
|
Provenance
The following attestation bundles were made for rars-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on bitplane/rars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rars-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
7f7cc6c583bd926ed8b379a94e868b6d250ae197223223966975b294e33ce9f3 - Sigstore transparency entry: 2021319461
- Sigstore integration time:
-
Permalink:
bitplane/rars@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/bitplane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Trigger Event:
push
-
Statement type:
File details
Details for the file rars-0.3.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rars-0.3.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 950.8 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44e382d6a6cfc900e64bd3e060df84c55463a53f549377ff199bbba81ed16148
|
|
| MD5 |
32f04a7b3dbf503f63ec9b8e44715709
|
|
| BLAKE2b-256 |
4fbbabe0c1107ef01ac2f96b592ac0cd5070a5ec87ed39b3fef5d116a5601d4e
|
Provenance
The following attestation bundles were made for rars-0.3.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on bitplane/rars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rars-0.3.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
44e382d6a6cfc900e64bd3e060df84c55463a53f549377ff199bbba81ed16148 - Sigstore transparency entry: 2021319274
- Sigstore integration time:
-
Permalink:
bitplane/rars@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/bitplane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Trigger Event:
push
-
Statement type:
File details
Details for the file rars-0.3.2-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: rars-0.3.2-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91f799f1982c8d11bb9ac3653b9f792a0477fc4bbfe9138c563b00a9514bb5ec
|
|
| MD5 |
def1a5df30cc46af20e456e0f34682fb
|
|
| BLAKE2b-256 |
d77eaf9e41cc65072be825331f936fe36a124057264b68b0aa4328b1ae406bbd
|
Provenance
The following attestation bundles were made for rars-0.3.2-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on bitplane/rars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rars-0.3.2-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
91f799f1982c8d11bb9ac3653b9f792a0477fc4bbfe9138c563b00a9514bb5ec - Sigstore transparency entry: 2021319400
- Sigstore integration time:
-
Permalink:
bitplane/rars@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/bitplane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74af8ce0e152458f25e3c0a67e6bf35d37cdadde -
Trigger Event:
push
-
Statement type: