{"id":15994699,"url":"https://github.com/taiki-e/cache-cargo-install-action","last_synced_at":"2026-02-14T10:12:29.378Z","repository":{"id":65226800,"uuid":"588643148","full_name":"taiki-e/cache-cargo-install-action","owner":"taiki-e","description":"GitHub Action for `cargo install` with cache.","archived":false,"fork":false,"pushed_at":"2024-04-28T06:39:43.000Z","size":75,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T23:58:15.196Z","etag":null,"topics":["github-actions","rust"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/taiki-e.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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},"funding":{"github":"taiki-e"}},"created_at":"2023-01-13T16:18:32.000Z","updated_at":"2024-06-11T05:32:18.017Z","dependencies_parsed_at":"2023-10-05T12:33:02.431Z","dependency_job_id":"4bc698a2-02f2-4c21-b937-e03114201dfd","html_url":"https://github.com/taiki-e/cache-cargo-install-action","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"e72b1550dd56a5ee890ba382bea565811717e85f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki-e%2Fcache-cargo-install-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki-e%2Fcache-cargo-install-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki-e%2Fcache-cargo-install-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki-e%2Fcache-cargo-install-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taiki-e","download_url":"https://codeload.github.com/taiki-e/cache-cargo-install-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869457,"owners_count":20361021,"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":["github-actions","rust"],"created_at":"2024-10-08T07:09:52.626Z","updated_at":"2026-02-14T10:12:29.369Z","avatar_url":"https://github.com/taiki-e.png","language":"Shell","funding_links":["https://github.com/sponsors/taiki-e"],"categories":[],"sub_categories":[],"readme":"# cache-cargo-install-action\n\n[![release](https://img.shields.io/github/release/taiki-e/cache-cargo-install-action?style=flat-square\u0026logo=github)](https://github.com/taiki-e/cache-cargo-install-action/releases/latest)\n[![github actions](https://img.shields.io/github/actions/workflow/status/taiki-e/cache-cargo-install-action/ci.yml?branch=main\u0026style=flat-square\u0026logo=github)](https://github.com/taiki-e/cache-cargo-install-action/actions)\n\nGitHub Action for `cargo install` with cache.\n\nThis installs the specified crate using `cargo install` and caches the installed binaries using [actions/cache].\nIf binaries for the specified crate are already cached, restore the cache instead of calling `cargo install`.\n\nThis was originally intended for installing crates that are not supported by [install-action].\nFor performance and robustness, we recommend using [install-action] if the tool is supported by [install-action].\n\n- [Usage](#usage)\n  - [Inputs](#inputs)\n  - [Example workflow](#example-workflow)\n- [Migrate from/to install-action](#migrate-fromto-install-action)\n- [Compatibility](#compatibility)\n- [Related Projects](#related-projects)\n- [License](#license)\n\n## Usage\n\n### Inputs\n\n| Name | Required | Description | Type | Default |\n| ---- | :------: | ----------- | ---- | ------- |\n| tool | **✓** | Crate to install | String | |\n| locked | | Use `--locked` flag | Boolean | true |\n| git | | Install from the specified Git URL (see [action.yml](action.yml) for more) | String | |\n| tag | | Tag to use when installing from git | String | |\n| rev | | Specific commit to use when installing from git | String | |\n| features | | Comma-separated list of features to enable when installing the crate | String | |\n| no-default-features | | Pass `--no-default-features` to `cargo install` | Boolean | false |\n| all-features | | Pass `--all-features` to `cargo install` | Boolean | false |\n\n### Example workflow\n\nTo install the latest version:\n\n```yaml\n- uses: taiki-e/cache-cargo-install-action@v3\n  with:\n    tool: cargo-hack\n```\n\nTo install a specific version, use `@version` syntax:\n\n```yaml\n- uses: taiki-e/cache-cargo-install-action@v3\n  with:\n    tool: cargo-hack@0.5.24\n```\n\nYou can also omit patch version.\n(You can also omit the minor version if the major version is 1 or greater.)\n\n```yaml\n- uses: taiki-e/cache-cargo-install-action@v3\n  with:\n    tool: cargo-hack@0.5\n```\n\n## Migrate from/to install-action\n\nThis action provides an interface compatible with [install-action].\n\nTherefore, migrating from/to [install-action] is usually just a change of action to be used. (if the tool and version are supported by install-action or install-action's `binstall` fallback)\n\nTo migrate from this action to install-action:\n\n```diff\n- - uses: taiki-e/cache-cargo-install-action@v3\n+ - uses: taiki-e/install-action@v2\n    with:\n      tool: cargo-hack\n```\n\nTo migrate from install-action to this action:\n\n```diff\n- - uses: taiki-e/install-action@v2\n+ - uses: taiki-e/cache-cargo-install-action@v3\n    with:\n      tool: cargo-hack\n```\n\nThe interface of this action is a subset of the interface of [install-action], so note the following limitations when migrating from install-action to this action.\n\n- install-action supports specifying multiple crates in a single action call, but this action does not.\n\n  For example, in install-action, you can write:\n\n  ```yaml\n  - uses: taiki-e/install-action@v2\n    with:\n      tool: cargo-hack,cargo-minimal-versions\n  ```\n\n  In this action, you need to write:\n\n  ```yaml\n  - uses: taiki-e/cache-cargo-install-action@v3\n    with:\n      tool: cargo-hack\n  - uses: taiki-e/cache-cargo-install-action@v3\n    with:\n      tool: cargo-minimal-versions\n  ```\n\n- install-action supports `@\u003ctool_name\u003e` shorthand, but this action does not.\n\n## Compatibility\n\nThis action has been tested for GitHub-hosted runners (Ubuntu, macOS, Windows) and containers (Ubuntu, Debian, Fedora, Alma, Arch, Alpine).\n\nTo use this action in self-hosted runners or in containers, at least the following tools are required:\n\n- cargo\n\nOn Linux, if other required tools are missing, this action will attempt to install them from distro's package manager, so no pre-setup is usually required.\n\nOn other platforms, the following tools are also required:\n\n- bash\n- jq (only on non-Windows platforms, and when installing the latest version or the patch version of the specified version is omitted)\n- curl (only when installing the latest version or the patch version of the specified version is omitted)\n- tar\n\nNote that what this action installs for its setup (such as above tools) is considered an implementation detail if they are installed by this action's side, and there is no guarantee that they will be available in subsequent steps, because this action is not an action for installing those tools.\n\n## Related Projects\n\n- [install-action]: GitHub Action for installing development tools (mainly from GitHub Releases).\n- [create-gh-release-action]: GitHub Action for creating GitHub Releases based on changelog.\n- [upload-rust-binary-action]: GitHub Action for building and uploading Rust binary to GitHub Releases.\n- [setup-cross-toolchain-action]: GitHub Action for setup toolchains for cross compilation and cross testing for Rust.\n- [checkout-action]: GitHub Action for checking out a repository. (Simplified actions/checkout alternative that does not depend on Node.js.)\n\n[actions/cache]: https://github.com/actions/cache\n[checkout-action]: https://github.com/taiki-e/checkout-action\n[create-gh-release-action]: https://github.com/taiki-e/create-gh-release-action\n[install-action]: https://github.com/taiki-e/install-action\n[setup-cross-toolchain-action]: https://github.com/taiki-e/setup-cross-toolchain-action\n[upload-rust-binary-action]: https://github.com/taiki-e/upload-rust-binary-action\n\n## License\n\nLicensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or\n[MIT license](LICENSE-MIT) at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiki-e%2Fcache-cargo-install-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaiki-e%2Fcache-cargo-install-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiki-e%2Fcache-cargo-install-action/lists"}