{"id":16369660,"url":"https://github.com/dcsunset/rangefs","last_synced_at":"2025-03-23T02:33:57.405Z","repository":{"id":214077632,"uuid":"735120954","full_name":"DCsunset/rangefs","owner":"DCsunset","description":"A FUSE-based read-only filesystem to map ranges in file to individual files.","archived":false,"fork":false,"pushed_at":"2024-06-26T01:38:39.000Z","size":134,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-12T02:55:58.704Z","etag":null,"topics":["file","filesystem","fs","fuse","range","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCsunset.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-12-23T18:29:04.000Z","updated_at":"2024-06-26T01:38:42.000Z","dependencies_parsed_at":"2024-01-09T00:28:25.587Z","dependency_job_id":"59152dff-91bf-447f-8ff1-db262ed71181","html_url":"https://github.com/DCsunset/rangefs","commit_stats":null,"previous_names":["dcsunset/rangefs"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Frangefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Frangefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Frangefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Frangefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCsunset","download_url":"https://codeload.github.com/DCsunset/rangefs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221843008,"owners_count":16890249,"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":["file","filesystem","fs","fuse","range","rust"],"created_at":"2024-10-11T02:55:57.426Z","updated_at":"2024-10-28T14:47:37.323Z","avatar_url":"https://github.com/DCsunset.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rangefs\n\n[![crates.io](https://badgen.net/crates/v/rangefs)](https://crates.io/crates/rangefs)\n\nA FUSE-based read-only filesystem to map ranges in file to individual files.\n\n## Installation\n\nPre-built binaries are available at the GitHub release page.\n\nYou can also use cargo to install it:\n\n```sh\ncargo install rangefs\n```\n\nIf you are using Nix, you can also install it from NUR package `nur.repos.dcsunset.rangefs`.\nThe NUR repo also provides a NixOS module:\n``` nix\nprograms.rangefs = {\n  enable = true;\n  fileSystems = {\n    \"/mntpoint\" = {\n      source = \"/src\";\n      config = [\n        {\n          name = \"dest\";\n          offset = 32;\n          size = 64;\n        }\n      ];\n      extraOptions = [ \"allow_other\" ];\n    };\n  };\n};\n```\n\n## Usage\n\nTo mount files with range to a mount point:\n\n```sh\n# mount a range as a new file\nrangefs --config offset=16:size=16 \u003cfile\u003e \u003cmount_point\u003e\n# multiple ranges with different names\nrangefs -c offset=4:name=range1 -c offset=8:size=8:name=range2 \u003cfile\u003e \u003cmount_point\u003e\n\n# unmount\nfusermount -u \u003cmount_point\u003e\n\n# To adjust log level and run at foreground\nRANGEFS_LOG=debug rangefs -c offset=1:size=1 --foreground \u003cfile\u003e \u003cmount_point\u003e\n```\n\nThe mount point will be a read-only filesystem containing files that corresponding to the specified ranges in the source file.\nRepeat the `--config` option to mount multiple ranges.\n\nNote that the program will run in the background by default.\nUse flag `--foreground` to run it in the foreground.\n\nIf the program exits without using `fusermount`,\n`fusermount` still needs to be used even after the program exits.\nYou can also use `-a` option to auto unmount the fs upon program exit.\n\nNote that rangefs also supports block special file.\nHowever, you need to specify the length of the range.\nOtherwise, the default length will be 0 (same as the size in the block file metadata).\n\nRangefs also supports mounting through `mount.fuse` or `/etc/fstab`.\nTo specify configs, start with `config::` and separate configs by double colons.\nFor timeout, stdout and stderr, specify `\u003coption\u003e::\u003cvalue\u003e` to set it.\n`::` is used instead of `=` to distinguish custom options from existing mount options.\nAn example fstab config:\n```\n/source_file /mount_point fuse./path/to/rangefs nofail,allow_other,config::name=r1:offset=1::name=r2:offset=2:size=2 0 0\n```\n\nSee available options using `rangefs --help`.\n\n## License\n\nAGPL-3.0. Copyright notice:\n\n```\nrangefs\nCopyright (C) 2023-2024  DCsunset\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Frangefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcsunset%2Frangefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Frangefs/lists"}