{"id":13636783,"url":"https://github.com/SergioBenitez/Figment","last_synced_at":"2025-04-19T08:33:16.925Z","repository":{"id":38268342,"uuid":"302881215","full_name":"SergioBenitez/Figment","owner":"SergioBenitez","description":"A hierarchical configuration library so con-free, it's unreal.","archived":false,"fork":false,"pushed_at":"2024-09-13T04:51:49.000Z","size":163,"stargazers_count":630,"open_issues_count":16,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T14:55:33.415Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SergioBenitez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-10-10T10:58:01.000Z","updated_at":"2024-10-27T07:43:29.000Z","dependencies_parsed_at":"2024-04-10T02:31:17.234Z","dependency_job_id":"3f4d7400-2e81-44ba-92b2-dddf05cd7cb5","html_url":"https://github.com/SergioBenitez/Figment","commit_stats":{"total_commits":68,"total_committers":8,"mean_commits":8.5,"dds":0.1029411764705882,"last_synced_commit":"a003ffa5eb4ef41f346aa15554d2151b075744ed"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioBenitez%2FFigment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioBenitez%2FFigment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioBenitez%2FFigment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioBenitez%2FFigment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergioBenitez","download_url":"https://codeload.github.com/SergioBenitez/Figment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223795250,"owners_count":17204136,"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-08-02T00:01:05.342Z","updated_at":"2024-11-09T06:30:54.583Z","avatar_url":"https://github.com/SergioBenitez.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust"],"sub_categories":["Configuration"],"readme":"# Figment \u0026thinsp; [![ci.svg]][ci] [![crates.io]][crate] [![docs.rs]][docs]\n\n[crates.io]: https://img.shields.io/crates/v/figment.svg\n[crate]: https://crates.io/crates/figment\n[docs.rs]: https://docs.rs/figment/badge.svg\n[docs]: https://docs.rs/figment\n[ci.svg]: https://github.com/SergioBenitez/Figment/workflows/CI/badge.svg\n[ci]: https://github.com/SergioBenitez/Figment/actions\n\nFigment is a semi-hierarchical configuration library for Rust so con-free, it's\n_unreal_.\n\n```rust\nuse serde::Deserialize;\n\nuse figment::{Figment, providers::{Format, Toml, Json, Env}};\n\n#[derive(Deserialize)]\nstruct Package {\n    name: String,\n    authors: Vec\u003cString\u003e,\n    publish: Option\u003cbool\u003e,\n    // ... and so on ...\n}\n\n#[derive(Deserialize)]\nstruct Config {\n    package: Package,\n    rustc: Option\u003cString\u003e,\n    // ... and so on ...\n}\n\nlet config: Config = Figment::new()\n    .merge(Toml::file(\"Cargo.toml\"))\n    .merge(Env::prefixed(\"CARGO_\"))\n    .merge(Env::raw().only(\u0026[\"RUSTC\", \"RUSTDOC\"]))\n    .join(Json::file(\"Cargo.json\"))\n    .extract()?;\n```\n\nSee the [documentation](https://docs.rs/figment) for a detailed usage guide and\ninformation.\n\n## Usage\n\nAdd the following to your `Cargo.toml`, enabling the desired built-in providers:\n\n```toml\n[dependencies]\nfigment = { version = \"0.10\", features = [\"toml\"] }\n```\n\n#### Third-Party Providers\n\nThe following external libraries implement Figment providers:\n\n - [`figment_file_provider_adapter`](https://crates.io/crates/figment_file_provider_adapter)\n\n   Wraps existing providers. For any key ending in `_FILE` (configurable), emits\n   a key without the `_FILE` suffix with a value corresponding to the contents\n   of the file whose path is the original key's value.\n\nPlease submit a pull request to add your library to this list.\n\n## License\n\nFigment is licensed under either of the following, at your option:\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSergioBenitez%2FFigment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSergioBenitez%2FFigment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSergioBenitez%2FFigment/lists"}