Skip to main content

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. Since 0.4, the lower-level rars-format, rars-codec, rars-crypto, rars-crc32, and rars-recovery crates are folded into rars; those standalone crates ended at 0.3.x. Applications should depend on rars, and command-line installs should use rars-cli.

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 --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 --bench parallel --features parallel
cargo +nightly bench -p rars --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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rars-0.4.6.tar.gz (4.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rars-0.4.6-cp310-abi3-win_amd64.whl (916.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

rars-0.4.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

rars-0.4.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (968.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

rars-0.4.6-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.9 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file rars-0.4.6.tar.gz.

File metadata

  • Download URL: rars-0.4.6.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rars-0.4.6.tar.gz
Algorithm Hash digest
SHA256 bf695536ac818ef5f8bf5cd9f09c91ddf40c6afbf6a3acb1394d71c685f57bb7
MD5 61f0c1ff747fd82f2680cddab6b0de09
BLAKE2b-256 8f648f6b0ae23f179ea7460804d7dbd851d0871f35770a7951ae9d9cf881d19a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rars-0.4.6.tar.gz:

Publisher: release.yml on bitplane/rars

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rars-0.4.6-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: rars-0.4.6-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 916.3 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rars-0.4.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 59440be2474654bb80306905df38d2c6e964a4877f7c377968a9571d63edced2
MD5 9670ff96bb31d1d21f04dc4eca49bc17
BLAKE2b-256 4da74408d203e8ba4ebb7e23e88ff349b50492bc420531f32055b11fdc5e4ef2

See more details on using hashes here.

Provenance

The following attestation bundles were made for rars-0.4.6-cp310-abi3-win_amd64.whl:

Publisher: release.yml on bitplane/rars

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rars-0.4.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rars-0.4.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd433f6ccdb84b38fca535e6b202e3a130f2d7a30271057c98a63bd5c8ce90ae
MD5 0e698000232926f298ece48c0c859255
BLAKE2b-256 200c54ac187fd2a9f9acdd7b1cbcdb166441be9eeb4f0c4bd035d20047dcdf7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rars-0.4.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on bitplane/rars

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rars-0.4.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rars-0.4.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd5cc60e9b4cd98cb974c62e551af273b628bf7df2afe0ad9be4dc9717f7fdc1
MD5 2697ee50966532a2e34ed8de95064e6d
BLAKE2b-256 50e47acc4807e1f1cc3e6cfa7e957c4022a0b7391328dd34c7afaaa30e763d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for rars-0.4.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on bitplane/rars

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rars-0.4.6-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for rars-0.4.6-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 88b641a4187d90f5c88e98648fb566c3deea3dcfc13fd1682c5688636fc6cc5f
MD5 cd4574d7ebce1b3f864b980ac7c457c0
BLAKE2b-256 1605c7935df1e500e3e7182e36460cab96d874add1f14d5bfe8c0f32917becac

See more details on using hashes here.

Provenance

The following attestation bundles were made for rars-0.4.6-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on bitplane/rars

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.3

5 files

0.9.2

5 files

0.9.1

5 files

0.9.0

5 files

0.8.0

5 files

0.7.4

5 files

0.7.3

5 files

0.6.0

5 files

0.5.2

5 files

0.5.1

5 files

0.5.0

5 files

0.4.9

5 files

0.4.8

5 files

0.4.7

5 files

This release

0.4.6 This release

5 files

0.4.5

5 files

0.4.4

5 files

0.4.3

4 files

0.4.2

5 files

0.4.1

5 files

0.4.0

5 files

0.3.2

5 files

0.3.1

5 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page