rars
A Rust implementation of RAR.
rars is free software and covers compression and decompression of archives
from the early RE~^ ones all the way through to RAR 7. It comes with a Rust
library, a CLI, Python and TypeScript bindings.
It's a bit slower than WinRAR, uses more memory, compresses a little bit worse and CLI isn't compatible with unrar. It could probably use more testing, too.
Usage
The rars crate is the API, as used by the Python and TypeScript packages.
For the CLI run cargo install rars-cli.
To inspect, test, and extract archives:
To create archives with a specific RAR generation:
The writer supports stored and compressed members, split volumes, passwords,
comments, RARVM filters, RAR5 quick-open records, and some support for recovery
records and header encryption. There are a lot of args, run rars --help for
more info.
Bindings
Python bindings are published to pypi, so you
can pip install rars. To build locally, it's just python.
For JS it's built to WebAssembly and published to
npm;
npm install @bitplane/rars. It reads and writes in the browser and in Node,
with no native module. To build locally, run just npm.