{"id":31574700,"url":"https://github.com/s95rob/romfs","last_synced_at":"2026-05-17T03:45:05.267Z","repository":{"id":317449566,"uuid":"1066862198","full_name":"s95rob/romfs","owner":"s95rob","description":"Tiny ROM-based filesystem library and packing tool for 32-bit embedded devices","archived":false,"fork":false,"pushed_at":"2025-09-30T22:53:26.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T00:25:34.753Z","etag":null,"topics":["c","embedded","embedded-systems","gbadev","homebrew","microcontroller","rom"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s95rob.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T04:13:30.000Z","updated_at":"2025-09-30T22:53:30.000Z","dependencies_parsed_at":"2025-10-01T00:25:39.409Z","dependency_job_id":"48a3451e-d892-43d9-86d4-0b49c3294a0e","html_url":"https://github.com/s95rob/romfs","commit_stats":null,"previous_names":["s95rob/romfs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/s95rob/romfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s95rob%2Fromfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s95rob%2Fromfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s95rob%2Fromfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s95rob%2Fromfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s95rob","download_url":"https://codeload.github.com/s95rob/romfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s95rob%2Fromfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486275,"owners_count":25994941,"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-10-05T02:00:06.059Z","response_time":54,"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":["c","embedded","embedded-systems","gbadev","homebrew","microcontroller","rom"],"created_at":"2025-10-05T16:57:56.313Z","updated_at":"2025-10-05T16:57:59.922Z","avatar_url":"https://github.com/s95rob.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# romfs\n\nA tiny ROM-based filesystem library and packing tool for 32-bit embedded devices. Pack files into a flat binary archive and index by filename. \n\n## Building and Usage\n\n`romfs` uses CMake for build system configuration. Clone this repository, add the repository as a CMake subdirectory and link against CMake target `romfs`. \n\nIn your project's code, simply initialize `romfs` and use it to index your data:\n\n```c\n// Declared some place elsewhere...\n\n#define MY_PROJECT_ROM_ADDR 0x08000000\n\nvoid do_something_with_data(volatile void* data, uint32_t size);\n\n// ...\n\n#include \"romfs.h\"\n\nif (!romfs_init((volatile void*)MY_PROJECT_ROM_ADDR)) {\n    // romfs failed to initialize...\n}\n\nromfs_file my_file;\n\nif (romfs_find(\u0026my_file, \"myfile1.txt\")) {\n    do_something_with_data(my_file.data, my_file.size);\n} else {\n    // romfs_find failed to find \"myfile1.txt\" ...\n}\n\n```\n\nAdditionally, there is an executable `romfs-pack`. This is a packing tool that will create a compiled ROM filesystem, `rom.bin`. It is designed to be integrated into build scripts, taking file names as command line arguments to be compiled.\n\nExample:\n```bash\nromfs-pack myfile1.txt myfile2.png myfile3.mp3\n```\n\n## Specification\n\n`romfs` uses a lightweight binary specification for indexing and storing files. The final produced binary file from the packing tool `romfs-pack` contains a header chunk, file entry chunk and binary chunk.  \n\n### Header\n\nStores the magic number identifier (ASCII string \"`DATA`\") and number of file entries in the file entry chunk. \n\n| Name | Bytes |\n|---|---|\n| Magic number | 4 |\n| Number of file entries | 4 |\n\n### File entry chunk\n\nEach file entry in the file entry chunk describes where and how large each file's associated binary data is. File names are stored hashed for size efficiency, and the binary offset points to the beginning of the file's binary data in relation to the binary chunk's beginning.  \n\n| Name | Bytes |\n|---|---|\n| Hashed file name | 4 |\n| Binary byte length | 4 |\n| Binary offset | 4 | \n\n### Binary chunk\n\nThe final chunk of the ROM filesystem contains a flat binary blob of all packed files. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs95rob%2Fromfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs95rob%2Fromfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs95rob%2Fromfs/lists"}