{"id":22290003,"url":"https://github.com/absolucy/asar-rs","last_synced_at":"2025-07-19T11:04:34.703Z","repository":{"id":38536746,"uuid":"504677718","full_name":"Absolucy/asar-rs","owner":"Absolucy","description":"Asar archive parsing in Rust","archived":false,"fork":false,"pushed_at":"2023-11-24T17:38:38.000Z","size":90,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-14T21:29:53.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Absolucy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-Apache.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-17T21:35:48.000Z","updated_at":"2024-09-14T04:34:49.000Z","dependencies_parsed_at":"2023-02-09T04:46:32.849Z","dependency_job_id":null,"html_url":"https://github.com/Absolucy/asar-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolucy%2Fasar-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolucy%2Fasar-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolucy%2Fasar-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolucy%2Fasar-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Absolucy","download_url":"https://codeload.github.com/Absolucy/asar-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227962275,"owners_count":17847912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T17:11:06.889Z","updated_at":"2024-12-03T17:11:07.751Z","avatar_url":"https://github.com/Absolucy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asar\n\nThis crate allows for the parsing, reading, and writing of [asar](https://github.com/electron/asar) archives,\noften seen in [Electron](https://www.electronjs.org/)-based applications.\n\n## Examples\n\n### Listing the contents of an asar archive\n```rust\nuse asar::{AsarReader, Header, Result};\nuse std::fs;\n\nfn main() -\u003e Result\u003c()\u003e {\n\tlet asar_file = fs::read(\"archive.asar\")?;\n\tlet asar = AsarReader::new(\u0026asar_file)?;\n\n\tprintln!(\"There are {} files in archive.asar\", asar.files().len());\n\tfor path in asar.files().keys() {\n\t\tprintln!(\"{}\", path.display());\n\t}\n\tOk(())\n}\n```\n\n### Reading a file from an asar archive\n```rust\nuse asar::{AsarReader, Header, Result};\nuse std::{fs, path::PathBuf};\n\nfn main() -\u003e Result\u003c()\u003e {\n\tlet asar_file = fs::read(\"archive.asar\")?;\n\tlet asar = AsarReader::new(\u0026asar_file)?;\n\n\tlet path = PathBuf::from(\"hello.txt\");\n\tlet file = asar.files().get(\u0026path).unwrap();\n\tlet contents = std::str::from_utf8(file.data()).unwrap();\n\tassert_eq!(contents, \"Hello, World!\");\n\tOk(())\n}\n```\n\n### Writing a file to an asar archive\n```rust\nuse asar::{AsarWriter, Result};\nuse std::fs::File;\n\nfn main() -\u003e Result\u003c()\u003e {\n\tlet mut asar = AsarWriter::new();\n\tasar.write_file(\"hello.txt\", b\"Hello, World!\", false)?;\n\tasar.finalize(File::create(\"archive.asar\")?)?;\n\tOk(())\n}\n```\n\n## Features\n\n - `integrity`: Enable integrity checks/calculation.\n - `check-integrity-on-read`: Enable integrity checks when reading an\n   archive, failing if any integrity check fails.\n - `write` - Enable writing an asar archive. **Enabled by default**, also\n   enables `integrity`.\n\n## License\n\n`asar` is licensed under either the [MIT license](LICENSE-MIT) or the\n[Apache License 2.0](LICENSE-APACHE), at the choice of the user.\n\nLicense: Apache-2.0 OR MIT\n\n### Amendment\n\nI, @Absolucy, fully give permission for any of my code (including the entirety of this project, asar-rs), anywhere, no matter the license, to be used to train machine learning models intended to be used for general-purpose programming or code analysis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsolucy%2Fasar-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabsolucy%2Fasar-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsolucy%2Fasar-rs/lists"}