{"id":20751847,"url":"https://github.com/meloencoding/carpenter","last_synced_at":"2025-10-12T12:14:05.053Z","repository":{"id":206668091,"uuid":"717011291","full_name":"MeloenCoding/carpenter","owner":"MeloenCoding","description":"Create multiple config files easily","archived":false,"fork":false,"pushed_at":"2023-11-11T13:42:32.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T07:04:17.232Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MeloenCoding.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}},"created_at":"2023-11-10T11:02:23.000Z","updated_at":"2023-11-11T14:04:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2714357-e433-44f3-b17e-9d217696741b","html_url":"https://github.com/MeloenCoding/carpenter","commit_stats":null,"previous_names":["meloencoding/carpenter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeloenCoding%2Fcarpenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeloenCoding%2Fcarpenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeloenCoding%2Fcarpenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeloenCoding%2Fcarpenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeloenCoding","download_url":"https://codeload.github.com/MeloenCoding/carpenter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243052482,"owners_count":20228398,"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-11-17T08:38:34.022Z","updated_at":"2025-10-12T12:14:04.969Z","avatar_url":"https://github.com/MeloenCoding.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carpenter\n\nCreate multiple config files easily.\n\n## Support\n- Support for all Sized integers\n- Support for Strings\n- Lightweight\n- Saves as binary for small file size\n\n## Installation/Usage\n#### Installation\nTo use this crate you need these dependencies:\n```toml\n[dependencies]\nbytestream = \"0.4.1\"\ncarpenter = \"0.1.0\"\n```\n\n#### Usage\n```rust\nuse carpenter::ConfigManager;\n\n// Create a struct and derive it with ConfigManager\n#[derive(ConfigManager, PartialEq, Debug)]\nstruct Config {\n    _a: i32,\n    _b: bool,\n    _c: String,\n}\n\nfn main() {\n    // Create config builder\n    let config_factory = Config::init_config(\n        \"meloencoding\", // username\n        \"config-rs-test\", // application name\n        \"test.bin\" // config file name\n    );\n\n    // To save your config\n    let sample_config = Config {\n        _a: 400,\n        _b: true,\n        _c: String::from(\"Hey\"),\n    };\n\n    config_factory.save(\u0026sample_config);\n\n    // To read the saved config\n    assert_eq!(sample_config, config_factory.read());\n}\n```\n\n## Config file in a HxD\n- Byte order is *Big endian*. \n- **i32** = 4 bytes so 0x00-0x03 is 0x00_00_01_90 which is 400 in decimal. \n- **bool** = 1 byte so 0x04-0x04 is 0x01 which is true in rust.\n- **String** = is in this case 4 bytes so 0x05-0x08 is 0x48_65_79_00 which is \"Hey\\0\". String gets null terminated.\n\n\u003cimg title=\"config file in hxd\" alt=\"config file in hxd\" src=\"hxd-file-example.JPG\"\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeloencoding%2Fcarpenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeloencoding%2Fcarpenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeloencoding%2Fcarpenter/lists"}