{"id":16975006,"url":"https://github.com/marioortizmanero/structconf","last_synced_at":"2025-08-09T02:10:58.426Z","repository":{"id":42071275,"uuid":"277523441","full_name":"marioortizmanero/structconf","owner":"marioortizmanero","description":"A procedural macro to combine multiple configuration methods at compile time","archived":false,"fork":false,"pushed_at":"2023-03-29T00:59:47.000Z","size":2703,"stargazers_count":11,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-02T08:00:52.726Z","etag":null,"topics":["argument-parser","config-file","procedural-macro"],"latest_commit_sha":null,"homepage":null,"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/marioortizmanero.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":"2020-07-06T11:28:36.000Z","updated_at":"2022-01-04T21:05:19.000Z","dependencies_parsed_at":"2024-10-28T13:22:27.106Z","dependency_job_id":null,"html_url":"https://github.com/marioortizmanero/structconf","commit_stats":{"total_commits":108,"total_committers":4,"mean_commits":27.0,"dds":"0.12037037037037035","last_synced_commit":"3e01277abb08d6b63bef262e70f95e4003b815db"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/marioortizmanero/structconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioortizmanero%2Fstructconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioortizmanero%2Fstructconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioortizmanero%2Fstructconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioortizmanero%2Fstructconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marioortizmanero","download_url":"https://codeload.github.com/marioortizmanero/structconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioortizmanero%2Fstructconf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269518731,"owners_count":24430644,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["argument-parser","config-file","procedural-macro"],"created_at":"2024-10-14T01:08:58.493Z","updated_at":"2025-08-09T02:10:58.406Z","avatar_url":"https://github.com/marioortizmanero.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003eStructConf\u003c/h1\u003e\n\u003cspan\u003e\u003ci\u003eCombine argument parsing with a config file at compile time.\u003c/i\u003e\u003c/span\u003e\n\n\u003ca href=\"https://github.com/marioortizmanero/structconf/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/marioortizmanero/structconf/workflows/Continuous%20Integration/badge.svg\"\u003e\u003c/a\u003e \u003ca alt=\"crates.io version\" href=\"https://crates.io/crates/structconf\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/structconf.svg\"\u003e\u003c/a\u003e \u003ca href=\"https://docs.rs/structconf\"\u003e\u003cimg alt=\"docs.rs version\" src=\"https://docs.rs/structconf/badge.svg\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n---\n\nStructConf is a small derive macro that allows you to combine argument parsing from [clap](https://github.com/clap-rs/clap) and config file parsing from [rust-ini](https://github.com/zonyitoo/rust-ini) at compile time. It's inspired by the argument parser [structopt](https://github.com/TeXitoi/structopt).\n\nStructConf aims to be relatively small and simple. Here are its current selling points:\n\n* Options available in the config file, argument parser, both, or none.\n* Configurable option names.\n* Custom types supported.\n* Optional fields with `Option`.\n* Custom default expressions.\n* Insightful error messages.\n* Thoroughly tested.\n\nSmall example:\n\n```rust\nuse structconf::{clap, StructConf};\n\n#[derive(Debug, StructConf)]\nstruct ServerConfig {\n    #[conf(help = \"The public key\")]\n    pub public_key: String,\n    #[conf(no_file, long = \"your-secret\", help = \"Your secret API key\")]\n    pub secret_key: String,\n    #[conf(default = \"100\", help = \"timeout in seconds\")]\n    pub timeout: i32,\n}\n\npub fn main() {\n    let app = clap::App::new(\"demo\");\n    let conf = ServerConfig::parse(app, \"config.ini\");\n    println!(\"Parsed config: {:#?}\", conf);\n}\n```\n\nFor more details on how to use Structconf, read [the docs](https://docs.rs/structconf/) and check out the [examples](examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioortizmanero%2Fstructconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarioortizmanero%2Fstructconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioortizmanero%2Fstructconf/lists"}