#electron #asar #file #unpack #capability #explorer #header

asar-explorer

A trait that adds capability to unpack electron .asar file(s)

1 unstable release

0.1.0 Dec 4, 2022

#14 in #unpack

MIT license

5KB
68 lines

asar-explorer

Trait to unpack an electron .asar file which implements std::io::Read.

Usage

Given an asar file named foo.asar

use std::fs::File;

use asar_explorer::Asar;

fn main() -> std::io::Result<()> {
    let mut file = File::open("foo.asar");
    let headers = file.get_headers()?;
    file.unpack_files(&headers, "./foo", None)?;

    Ok(())
}

The above sample will unpack all files into a relative directory called foo.

And that's about it.

Dependencies

~360–760KB
~17K SLoC