{"id":17038995,"url":"https://github.com/dcnick3/hac-rs","last_synced_at":"2025-08-08T05:44:06.216Z","repository":{"id":107292134,"uuid":"587924469","full_name":"DCNick3/hac-rs","owner":"DCNick3","description":"A rust library to read some formats used by Nintendo Switch operating system","archived":false,"fork":false,"pushed_at":"2023-07-14T22:55:21.000Z","size":197,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T23:44:46.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCNick3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T22:48:29.000Z","updated_at":"2023-06-15T19:16:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c062c279-b6b9-4980-9ebd-d40e89992b9a","html_url":"https://github.com/DCNick3/hac-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DCNick3/hac-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fhac-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fhac-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fhac-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fhac-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCNick3","download_url":"https://codeload.github.com/DCNick3/hac-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fhac-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269372641,"owners_count":24406273,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-14T08:58:23.554Z","updated_at":"2025-08-08T05:44:05.862Z","avatar_url":"https://github.com/DCNick3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A library to read some formats used by Nintendo Switch operating system.\n\nMostly based on code in [LibHac](https://github.com/Thealexbarney/LibHac)\n\n## Supported formats\n\n### NCAs\nEncrypted \u0026 container format for games and updates\n\nDecryption \u0026 integrity verification are supported, though the header signature is not yet checked.  \n\nNo support for BKTR patching and AES-XTS encryption (which NCAs even use it?).\n\n### PartitionFs\nFilesystem used for ExeFS, metadata storage.\n\n### RomFs\nFilesystem used to store game assets. \n\nNote that while the RomFs itself is supported, no support is provided for BKTR patching, so currently it is not possible to read RomFs from updates.\n\n### CNMT\nCNMT are used to store metadata about titles and applications, prior to the downloading of the content.\n\nThe parsed CNMT is fully represented with nice rusty structs and enums.\n\n### NACP\nNACP are used to store metadata about titles and applications, after the downloading of the content.\nThey include a lot of information about what the application can and can't do.\n\nAll this information is available as rust structs.\n\n### Ticket\nTickets are used to store metadata about the rights of a user to access a title.\n\nThere is support of extracting the rights ID and the title key from the ticket, if it is not personalized (Personalized stuff requires decryption of RSA messages and is not supported yet).\n\n### NSP\nNSP are actually just a PartitionFs with NCAs and stuff inside.\nThere is a `SwitchFs` struct, which allows to load NCAs from a filesystem. \nIt parses all the metadata files (CNMTs and NACPs) and makes them available as a list of titles and applications.\n\n## API\n\nThe code handling the above formats is actually agnostic of the storage it is operating on.\n\nIt uses `ReadableStorage` trait to represent raw byte storage, allowing `read(offset, size)` operations on it. There is also `ReadableBlockStorage`, which constraints operations to only work with full blocks, which is useful for crypto and integrity verification stuff.\n\nFinally, there is a `ReadableFileSystem`, along with `ReadableFile`, `ReadableDirectory` trait, which allow to represent _some_ filesystem.\n\nYou can open sections of NCAs as `ReadableFileSystem`, without caring about the actual file system in use.\n\nThe API surface is definitely not final \u0026 stable yet, I am willing to make changes that would make it nicer.\n\n## Cli\n\nThere are plans to make __some__ CLI tool, but what exist now is very bare-bones.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Fhac-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcnick3%2Fhac-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Fhac-rs/lists"}