A lightweight archive extraction utility.
This plugin requires a Rust version of at least 1.64
There are three general methods of installation that we can recommend.
Install the Core plugin by adding the following to your Cargo.toml
file:
src-tauri/Cargo.toml
[dependencies]
tauri-plugin-unarchiver = { git = "https://github.com/ZanzyTHEbar/tauri-plugin-unarchiver", branch = "main" }
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
[!NOTE] Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
pnpm add https://github.com/ZanzyTHEbar/tauri-plugin-unarchiver
# or
npm add https://github.com/ZanzyTHEbar/tauri-plugin-unarchiver
# or
yarn add https://github.com/ZanzyTHEbar/tauri-plugin-unarchiver
First you need to register the core plugin with Tauri:
src-tauri/src/main.rs
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_unarchiver::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
import { unarchive } from "tauri-plugin-unarchiver-api";
// Destination is optional, if not provided it will be extracted to the same directory as the archive
await unarchive("/path/to/file", "/path/to/destination");
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
Code: (c) 2015 - Present - DaOfficialWizard.
MIT or MIT/Apache 2.0 where applicable.