{"id":23261628,"url":"https://github.com/eopb/cargo-override","last_synced_at":"2025-04-05T03:03:40.107Z","repository":{"id":254240095,"uuid":"681232634","full_name":"eopb/cargo-override","owner":"eopb","description":"The quickest way to override dependencies with Cargo","archived":false,"fork":false,"pushed_at":"2025-04-01T23:49:21.000Z","size":232,"stargazers_count":60,"open_issues_count":14,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T16:54:29.811Z","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/eopb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2023-08-21T15:00:12.000Z","updated_at":"2025-03-28T21:37:02.000Z","dependencies_parsed_at":"2025-02-13T21:11:16.612Z","dependency_job_id":"6a54fa4b-d808-4b4c-bb4c-e16af2844550","html_url":"https://github.com/eopb/cargo-override","commit_stats":{"total_commits":123,"total_committers":7,"mean_commits":"17.571428571428573","dds":"0.22764227642276424","last_synced_commit":"7e9fa20e65701c6751d2218197ffb94478481d1d"},"previous_names":["eopb/cargo-override"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eopb%2Fcargo-override","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eopb%2Fcargo-override/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eopb%2Fcargo-override/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eopb%2Fcargo-override/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eopb","download_url":"https://codeload.github.com/eopb/cargo-override/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217170,"owners_count":20903008,"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-12-19T13:33:49.035Z","updated_at":"2025-04-05T03:03:40.091Z","avatar_url":"https://github.com/eopb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cargo-override\n\n[![License](https://img.shields.io/crates/l/cargo-override.svg)](https://crates.io/crates/cargo-override)\n[![Latest version](https://img.shields.io/crates/v/cargo-override.svg)](https://crates.io/crates/cargo-override)\n[![downloads-badge](https://img.shields.io/crates/d/cargo-override.svg)](https://crates.io/crates/cargo-override)\n\nQuickly [override dependencies](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) using the `[patch]` section of `Cargo.toml`s.\n\nThis plugin adds a new cargo subcommand, `cargo override`, which makes it trivial to patch dependencies with custom local copies, or versions from Git.\n\n`cargo override` infers a number of things you would otherwise need to be checked manually:\n\n```toml\n[patch.crates-io]\n#      ^^^^^^^^^ The correct registry for this dependency\nanyhow = { path = \"../anyhow\" }\n#          ^^^^^^^^^^^^^^^^^ A crate called \"anyhow\" is exposed at this source\n#^^^^^ The name of the crate to patch\n#                  ^^^^^^^^^\n#                  The version of anyhow exposed here meets, the requirement\n#                  we set in our `Cargo.toml`, so it will be valid as a patch\n```\n\n\u003e [!NOTE]  \n\u003e `cargo-override` is still in alpha so there may be some rough edges.\n\u003e Please let us know if you experience bugs or find areas that can be improved, even if the issue is minor.\n\n# Installation\n\nFirst, ensure that you have a recent version of `cargo` installed.\n\n## Cargo\n\n`cargo override` can then be installed with `cargo`.\n\n```\ncargo install cargo-override --locked\n```\n\n## Nix ❄️\n\nYou can try `cargo override` in your shell with flakes enabled, using:\n\n```\nnix shell github:eopb/cargo-override\n```\n\n\n# Usage\n\n## Overriding dependencies with a local version\n\nTo override a dependency with a local copy, use `--path`.\n\nFor example, if the relative path `../anyhow` contains a modified copy of the `anyhow` crate:\n```\ncargo override --path ../anyhow\n```\n\nAs a result, a patch similar to this one would be appended to your `Cargo.toml`:\n\n```toml\n[patch.crates-io]\nanyhow = { path = \"../anyhow\" }\n```\n\n## Overriding dependencies with a version from Git\n\nTo override a dependency with a Git source, use `--git`.\n\nFor example, if `https://github.com/dtolnay/anyhow` contains a new release of the `anyhow` crate,\nthat is not yet on crates.io:\n\n```\ncargo override --git https://github.com/dtolnay/anyhow\n```\n\nAs a result, a patch similar to this one would be appended to your `Cargo.toml`:\n\n```toml\n[patch.crates-io]\nanyhow = { git = \"https://github.com/dtolnay/anyhow\" }\n```\n\nAdditionally, the flags `--branch`, `--tag` and `--rev` can be used to source the repository at a specific, branch, tag or Git revision, respectively.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feopb%2Fcargo-override","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feopb%2Fcargo-override","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feopb%2Fcargo-override/lists"}