{"id":16592530,"url":"https://github.com/jakestanger/universal-config-rs","last_synced_at":"2026-06-06T15:31:22.465Z","repository":{"id":147921592,"uuid":"613075466","full_name":"JakeStanger/universal-config-rs","owner":"JakeStanger","description":"A library for Rust to simplify reading configuration files from various file formats.","archived":false,"fork":false,"pushed_at":"2024-06-16T22:18:04.000Z","size":120,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T22:37:46.799Z","etag":null,"topics":["config","rust","rust-library","serde"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/universal-config","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/JakeStanger.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-03-12T20:06:19.000Z","updated_at":"2025-01-22T02:10:06.000Z","dependencies_parsed_at":"2024-06-16T23:28:33.493Z","dependency_job_id":"23702263-920e-4f0a-8ec0-87cdb9f98846","html_url":"https://github.com/JakeStanger/universal-config-rs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Funiversal-config-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Funiversal-config-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Funiversal-config-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Funiversal-config-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeStanger","download_url":"https://codeload.github.com/JakeStanger/universal-config-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242241245,"owners_count":20095339,"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":["config","rust","rust-library","serde"],"created_at":"2024-10-11T23:21:14.069Z","updated_at":"2026-06-06T15:31:22.461Z","avatar_url":"https://github.com/JakeStanger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Config\n\n[crate](https://crates.io/crates/universal-config) | \n[docs](https://docs.rs/universal-config) | \n[repo](https://github.com/jakestanger/universal-config-rs)\n\nUniversal Config is a library for Rust to simplify reading and writing configuration files.\nIt is able to automatically locate config files from standard locations, and has support for various file formats.\n\nThe crate does not offer a lot of functionality, leaving that to Serde and your implementation. \nInstead, it just deals with loading and saving the file.\n\nCurrently, the following formats are supported:\n\n- JSON via `serde_json`\n- YAML via `serde_yaml`\n- TOML via `toml`\n- XML via `serde_xml_rs`\n- [Corn](https://github.com/jakestanger/corn) via `libcorn`\n- [KDL](https://kdl.dev/) via `kaydle`\n- [Ron](https://github.com/ron-rs/ron) via `ron`\n\n# Installation\n\nJust add the crate:\n\n```bash\ncargo add universal-config\n```\n\nBy default, support for all languages is included. \nYou can enable/disable languages using feature flags. For example, in your `Cargo.toml`:\n\n```toml\n[dependencies.universal-config]\nversion = \"0.1.0\"\ndefault-features = false\nfeatures = [\"json\", \"toml\"]\n```\n\n## Example usage\n\n```no_run\nuse universal_config::ConfigLoader;\nuse serde::Deserialize;\n\n#[derive(Deserialize)]\nstruct MyConfig {\n    foo: String,\n}\n\nlet config: MyConfig = ConfigLoader::new(\"my-app\").find_and_load().unwrap();\nprintln!(\"{}\", config.foo);\n\n```\n\nFor more advanced usage, please check the [docs](https://docs.rs/universal-config).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakestanger%2Funiversal-config-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakestanger%2Funiversal-config-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakestanger%2Funiversal-config-rs/lists"}