RAR libraries for Rust
For Rust, the unrar crate is the established choice. It bundles RARLAB’s UnRAR C++ source, compiles it with your C++ compiler and wraps it in a type-safe API that lists and extracts entries front to back. Because it uses the reference code, it opens every RAR file, including encrypted and multi-volume ones. The crate is MIT / Apache-2.0, but the bundled UnRAR code has the UnRAR license, which isn’t OSI open source.
If you need a permissive license and can live without encrypted archives, crates that bind libarchive (such as compress-tools) read RAR through libarchive.
- unrar The unrar crate lists and extracts RAR4 and RAR5 archives in Rust using RARLAB's UnRAR code. How to add it, list files, extract to disk or memory.