{"id":17825406,"url":"https://github.com/thebutlah/feature_utils","last_synced_at":"2025-04-02T10:42:58.694Z","repository":{"id":63604214,"uuid":"569116177","full_name":"TheButlah/feature_utils","owner":"TheButlah","description":"A collection of helper macros to make feature flags easier with better error messages","archived":false,"fork":false,"pushed_at":"2022-11-22T06:23:08.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T17:12:08.117Z","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/TheButlah.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":"2022-11-22T05:36:41.000Z","updated_at":"2022-11-22T06:25:58.000Z","dependencies_parsed_at":"2022-11-22T08:45:23.164Z","dependency_job_id":null,"html_url":"https://github.com/TheButlah/feature_utils","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/TheButlah%2Ffeature_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheButlah%2Ffeature_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheButlah%2Ffeature_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheButlah%2Ffeature_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheButlah","download_url":"https://codeload.github.com/TheButlah/feature_utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246802594,"owners_count":20836365,"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-27T18:05:29.284Z","updated_at":"2025-04-02T10:42:58.674Z","avatar_url":"https://github.com/TheButlah.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feature Utils\nThis crate implements a collection of helpful feature-related macros. These macros\nserve to make it easy to have helpful compiler messages when dealing with sets of\nrelated, sometimes mutually exclusive features.\n\n\n## Stability\nWe are pre-0.1, so we make no stability guarantees currently. Cargo consideres 0.0.* to\nmean that all new versions are possibly breaking changes.\n\n\n## Example\n\nInside `build.rs`:\n```rust\n// Each of these embedded microcontrollers are mutually exclusive and at least one\n// must be provided.\nfeature_utils::mandatory_and_unique!(\"esp32c3\", \"esp8266\", \"nrf52840\");\nfn main() {}\n```\n\nThis results in one message if you don't pass any features:\n\n```text\nerror: You must provide one of the mandatory features!\n --\u003e src/lib.rs:18:1\n  |\n5 | feature_utils::mandatory_and_unique!(\"esp32c3\", \"esp8266\", \"nrf52840\");\n  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  |\n  = note: this error originates in the macro `$crate::at_least_one_provided` which comes\nfrom the expansion of the macro `feature_utils::mandatory_and_unique` (in Nightly\nbuilds, run with -Z macro-backtrace for more info)\n```\n\nAnd another message if you pass multiple mutually exclusive features:\n\n```text\nerror: features \"esp32c3\" and \"nrf52840\" cannot be used together!\n --\u003e src/lib.rs:18:1\n  |\n5 | feature_utils::mandatory_and_unique!(\"esp32c3\", \"esp8266\", \"nrf52840\");\n  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  |\n  = note: this error originates in the macro `$crate::unique` which comes from the\nexpansion of the macro `feature_utils::mandatory_and_unique` (in Nightly builds, run\nwith -Z macro-backtrace for more info)\n```\n\n## License\nAll code in this repository is dual-licensed under either:\n\n- MIT License ([LICENSE-MIT](LICENSE-MIT))\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))\n\nat your option. This means you can select the license you prefer!\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for\ninclusion in the work by you, as defined in the Apache-2.0 license, shall be dual\nlicensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebutlah%2Ffeature_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthebutlah%2Ffeature_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebutlah%2Ffeature_utils/lists"}