{"id":18084844,"url":"https://github.com/jwodder/cfgfifo","last_synced_at":"2026-02-26T18:18:23.636Z","repository":{"id":204326001,"uuid":"711583431","full_name":"jwodder/cfgfifo","owner":"jwodder","description":"(De)serialize common configuration file formats based on file extension","archived":false,"fork":false,"pushed_at":"2025-03-24T12:21:11.000Z","size":94,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T20:09:26.104Z","etag":null,"topics":["available-on-crates-io","configuration","data-serialization","file-formats","json","json5","ron","rust","serde","toml","yaml"],"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/jwodder.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-29T17:51:43.000Z","updated_at":"2025-03-03T05:28:57.000Z","dependencies_parsed_at":"2024-02-10T19:25:13.462Z","dependency_job_id":"ff703214-f090-452d-bd6c-7c5a515fb1ef","html_url":"https://github.com/jwodder/cfgfifo","commit_stats":null,"previous_names":["jwodder/cfgurate","jwodder/cfgfifo"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fcfgfifo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fcfgfifo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fcfgfifo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fcfgfifo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/cfgfifo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"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":["available-on-crates-io","configuration","data-serialization","file-formats","json","json5","ron","rust","serde","toml","yaml"],"created_at":"2024-10-31T15:08:24.692Z","updated_at":"2026-02-26T18:18:23.623Z","avatar_url":"https://github.com/jwodder.png","language":"Rust","readme":"[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CI Status](https://github.com/jwodder/cfgfifo/actions/workflows/test.yml/badge.svg)](https://github.com/jwodder/cfgfifo/actions/workflows/test.yml)\n[![codecov.io](https://codecov.io/gh/jwodder/cfgfifo/branch/master/graph/badge.svg)](https://codecov.io/gh/jwodder/cfgfifo)\n[![Minimum Supported Rust Version](https://img.shields.io/badge/MSRV-1.88-orange)](https://www.rust-lang.org)\n[![MIT License](https://img.shields.io/github/license/jwodder/cfgfifo.svg)](https://opensource.org/licenses/MIT)\n\n[GitHub](https://github.com/jwodder/cfgfifo) | [crates.io](https://crates.io/crates/cfgfifo) | [Documentation](https://docs.rs/cfgfifo) | [Issues](https://github.com/jwodder/cfgfifo/issues) | [Changelog](https://github.com/jwodder/cfgfifo/blob/master/CHANGELOG.md)\n\n`cfgfifo` is a Rust library for serializing \u0026 deserializing various common\nconfiguration file formats ([JSON][], [JSON5][], [RON][], [TOML][], and\n[YAML][]), including autodetecting the format of a file based on its file\nextension.  It's good for application authors who want to support multiple\nconfiguration file formats but don't want to write out a bunch of boilerplate.\n`cfgfifo` has already written that boilerplate for you, so let it (de)serialize\nyour files!\n\n[JSON]: https://www.json.org\n[JSON5]: https://json5.org\n[RON]: https://github.com/ron-rs/ron\n[TOML]: https://toml.io\n[YAML]: https://yaml.org\n\nExample\n=======\n\n```rust\nuse serde::Deserialize;\n\n#[derive(Clone, Debug, Deserialize, Eq, PartialEq)]\nstruct AppConfig {\n    #[serde(default)]\n    enable_foo: bool,\n    #[serde(default)]\n    bar_type: BarType,\n    #[serde(default)]\n    flavor: Option\u003cString\u003e,\n}\n\n#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]\nenum BarType {\n    #[default]\n    Open,\n    Closed,\n    Clopen,\n}\n\nfn main() -\u003e anyhow::Result\u003c()\u003e {\n    let Some(cfgpath) = std::env::args().nth(1) else {\n        anyhow::bail!(\"No configuration file specified\");\n    };\n    // cfgfifo identifies the format used by the file `cfgpath` based on its\n    // file extension and deserializes it appropriately:\n    let cfg: AppConfig = cfgfifo::load(cfgpath)?;\n    println!(\"You specified the following configuration:\");\n    println!(\"{cfg:#?}\");\n    Ok(())\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fcfgfifo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Fcfgfifo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fcfgfifo/lists"}