{"id":16960136,"url":"https://github.com/dflemstr/cargo-feature-aspect","last_synced_at":"2025-09-13T16:53:30.485Z","repository":{"id":246699526,"uuid":"821907712","full_name":"dflemstr/cargo-feature-aspect","owner":"dflemstr","description":"A Cargo plugin that creates and updates aspect features across a Cargo workspace","archived":false,"fork":false,"pushed_at":"2024-06-30T19:14:34.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T06:39:06.313Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflemstr.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":"2024-06-29T19:31:59.000Z","updated_at":"2024-07-01T08:09:19.000Z","dependencies_parsed_at":"2024-06-29T19:59:12.717Z","dependency_job_id":null,"html_url":"https://github.com/dflemstr/cargo-feature-aspect","commit_stats":null,"previous_names":["dflemstr/cargo-feature-aspect"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcargo-feature-aspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcargo-feature-aspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcargo-feature-aspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Fcargo-feature-aspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflemstr","download_url":"https://codeload.github.com/dflemstr/cargo-feature-aspect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240381650,"owners_count":19792512,"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-13T22:47:13.627Z","updated_at":"2025-02-23T21:26:26.630Z","avatar_url":"https://github.com/dflemstr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `cargo feature-aspect`\n\nA Cargo plugin that creates and updates feature aspects across a Cargo workspace.\n\n## Installation\n\nSimply install using `cargo` with `cargo install cargo-feature-aspect`.\n\n## Details\n\nA feature aspect is a feature that should generally exist for all crates in a workspace\nthat depend on some shared crate.  This shared crate's feature will be propagated to all\nof its dependees.\n\nFor example, if a hypothetical `logging` crate has a `enable-tracing` feature, all crates\nthat depend on `logging` might want to have their own `enable-tracing` feature, that enables\nadditional tracing stuff in the local crate, and also enables the `enable-tracing` feature on\nall dependency crates.  In other words, we want to have the crates that depend directly on\n`logging` to have a feature like so:\n\n```\n[package]\nname = \"foo\"\n\n[dependencies]\nlogging = \"...\"\n\n[features]\nenable-tracing = [\"logging/enable-tracing\"]\n```\n\n...and second order dependees would get a matching feature that propagates this feature down\nthe chain:\n\n```\n[package]\nname = \"bar\"\n\n[dependencies]\nfoo = \"...\"\n\n[features]\nenable-tracing = [\"foo/enable-tracing\"]\n```\n\nThis command creates and updates such a feature aspect across the crate graph.\n\nExample usages:\n\n```shell\n# Any crate that indirectly depends on the `logging` crate should have a feature\n# `enable-tracing` that is propagated through all dependency crates.\ncargo feature-aspect --name enable-tracing --leaf-feature logging/enable-tracing\n\n# Same as above, but `--name` is inferred from `--leaf-feature`.\ncargo feature-aspect --leaf-feature logging/enable-tracing\n\n# Any such crate should also enable the `logging` optional dependency.\ncargo feature-aspect --leaf-feature logging/enable-tracing --add-feature-param dep:logging\n\n# Do not re-order the `enable-tracing` feature param array when it is not already in\n# alphabetical order.\ncargo feature-aspect --leaf-feature logging/enable-tracing --no-sort\n\n# Dry-run to see what changes would be made\ncargo feature-aspect --leaf-feature logging/enable-tracing --dry-run\n\n# Verify that the feature aspect is up-to-date (useful for CI)\ncargo feature-aspect --leaf-feature logging/enable-tracing --verify\n```\n\n## Attribution\n\nSome code in this crate was copied from `cargo-edit` which is\nCopyright (c) 2015 Without Boats, Pascal Hertleif.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Fcargo-feature-aspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflemstr%2Fcargo-feature-aspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Fcargo-feature-aspect/lists"}