{"id":16714207,"url":"https://github.com/flier/rust-runtime-cfg","last_synced_at":"2025-03-15T07:11:43.085Z","repository":{"id":57664263,"uuid":"189209621","full_name":"flier/rust-runtime-cfg","owner":"flier","description":"Evaluation of configuration flags, at runtime-time.","archived":false,"fork":false,"pushed_at":"2019-05-31T08:04:44.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T22:09:41.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/flier.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}},"created_at":"2019-05-29T11:09:41.000Z","updated_at":"2019-05-31T08:04:46.000Z","dependencies_parsed_at":"2022-09-10T14:20:27.935Z","dependency_job_id":null,"html_url":"https://github.com/flier/rust-runtime-cfg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-runtime-cfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-runtime-cfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-runtime-cfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-runtime-cfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flier","download_url":"https://codeload.github.com/flier/rust-runtime-cfg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695589,"owners_count":20332629,"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-10-12T20:49:52.281Z","updated_at":"2025-03-15T07:11:43.049Z","avatar_url":"https://github.com/flier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# runtime_cfg [![travis](https://travis-ci.org/flier/rust-runtime-cfg.svg?branch=master)](https://travis-ci.org/flier/rust-runtime-cfg) [![crate](https://img.shields.io/crates/v/runtime_cfg.svg)](https://crates.io/crates/runtime_cfg) [![docs](https://docs.rs/runtime_cfg/badge.svg)](https://docs.rs/crate/runtime_cfg/) [![dependency status](https://deps.rs/repo/github/flier/rust-runtime-cfg/status.svg)](https://deps.rs/repo/github/flier/rust-runtime-cfg)\n\nEvaluation of configuration flags, at runtime-time.\n\n## Usage\n\nTo use `runtime_cfg` in your project, add the following to your Cargo.toml:\n\n``` toml\n[dependencies]\nruntime-cfg = \"0.1\"\n```\n\n## Example\n\n```rust\nuse std::convert::TryFrom;\n\nuse quote::quote;\n\nuse runtime_cfg::*;\n\nlet cfg = quote! { #[cfg(all(unix, target_pointer_width = \"32\"))] };\n\nlet cfg = Cfg::try_from(cfg).unwrap();\nassert_eq!(cfg, all(vec![name(\"unix\"), name_value(\"target_pointer_width\", \"32\")]).into());\n\nlet flags = vec![(\"unix\", None), (\"target_pointer_width\", Some(\"32\"))];\nassert!(cfg.matches(\u0026flags));\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-runtime-cfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflier%2Frust-runtime-cfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-runtime-cfg/lists"}