{"id":13595812,"url":"https://github.com/actions-rs/cargo","last_synced_at":"2025-10-08T05:30:42.910Z","repository":{"id":40362864,"uuid":"208143758","full_name":"actions-rs/cargo","owner":"actions-rs","description":"📦 GitHub Action for Rust `cargo` command","archived":true,"fork":false,"pushed_at":"2024-06-19T14:36:11.000Z","size":1158,"stargazers_count":644,"open_issues_count":63,"forks_count":60,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-17T17:40:21.806Z","etag":null,"topics":["cargo","cross","github","github-actions","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/rust-cargo","language":"TypeScript","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/actions-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-09-12T20:48:12.000Z","updated_at":"2025-01-14T22:22:08.000Z","dependencies_parsed_at":"2024-08-17T23:47:42.052Z","dependency_job_id":null,"html_url":"https://github.com/actions-rs/cargo","commit_stats":{"total_commits":160,"total_committers":2,"mean_commits":80.0,"dds":0.1875,"last_synced_commit":"9e120dd99b0fbad1c065f686657e914e76bd7b72"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-rs%2Fcargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-rs%2Fcargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-rs%2Fcargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-rs%2Fcargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-rs","download_url":"https://codeload.github.com/actions-rs/cargo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235683861,"owners_count":19029079,"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":["cargo","cross","github","github-actions","rust","rust-lang"],"created_at":"2024-08-01T16:01:58.215Z","updated_at":"2025-10-08T05:30:37.572Z","avatar_url":"https://github.com/actions-rs.png","language":"TypeScript","readme":"# Rust `cargo` Action\n\n[![Sponsoring](https://img.shields.io/badge/Support%20it-Say%20%22Thank%20you!%22-blue)](https://actions-rs.github.io/#sponsoring)\n![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)\n[![Gitter](https://badges.gitter.im/actions-rs/community.svg)](https://gitter.im/actions-rs/community)\n![Continuous integration](https://github.com/actions-rs/cargo/workflows/Continuous%20integration/badge.svg)\n![Dependabot enabled](https://api.dependabot.com/badges/status?host=github\u0026repo=actions-rs/toolchain)\n\nThis GitHub Action runs specified [`cargo`](https://github.com/rust-lang/cargo)\ncommand on a Rust language project.\n\n**Table of Contents**\n\n* [Example workflow](#example-workflow)\n* [Use cases](#use-cases)\n* [Inputs](#inputs)\n* [Toolchain](#toolchain)\n* [Cross-compilation](#cross-compilation)\n* [License](#license)\n* [Contribute and support](#contribute-and-support)\n\n## Example workflow\n\n```yaml\non: [push]\n\nname: CI\n\njobs:\n  build_and_test:\n    name: Rust project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          toolchain: stable\n      - uses: actions-rs/cargo@v1\n        with:\n          command: build\n          args: --release --all-features\n```\n\nSee [additional recipes here](https://github.com/actions-rs/meta).\n\n## Use cases\n\nNote that this Action is not required usually\nand you can just use [`run`](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun)\nstep instead as in example below:\n\n```yaml\njobs:\n  build_and_test:\n    name: Rust project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          toolchain: stable\n      - run: cargo build --release --all-features\n```\n\nWhy would you want to use this Action instead:\n\n1. Transparent `cross` installation and execution with `use-cross: true` input enabled\n2. Warnings and errors issued by `cargo` will be displayed in GitHub UI\n\n## Inputs\n\n| Name        | Required | Description                                                              | Type   | Default |\n| ------------| :------: | -------------------------------------------------------------------------| ------ | --------|\n| `command`   | ✓        | Cargo command to run, ex. `check` or `build`                             | string |         |\n| `toolchain` |          | Rust toolchain name to use                                               | string |         |\n| `args`      |          | Arguments for the cargo command                                          | string |         |     \n| `use-cross` |          | Use [`cross`](https://github.com/rust-embedded/cross) instead of `cargo` | bool   | false   |\n\n## Toolchain\n\nBy default this Action will call whatever `cargo` binary is available\nin the current [virtual environment](https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions).\n\nYou can use [`actions-rs/toolchain`](https://github.com/actions-rs/toolchain)\nto install specific Rust toolchain with `cargo` included.\n\n## Cross-compilation\n\nIn order to make cross-compile an easy process,\nthis Action can install [cross](https://github.com/rust-embedded/cross)\ntool on demand if `use-cross` input is enabled; `cross` executable will be invoked\nthen instead of `cargo` automatically.\n\nAll consequent calls of this Action in the same job\nwith `use-cross: true` input enabled will use the same `cross` installed.\n\n```yaml\non: [push]\n\nname: ARMv7 build\n\njobs:\n  linux_arm7:\n    name: Linux ARMv7\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          toolchain: stable\n          target: armv7-unknown-linux-gnueabihf\n          override: true\n      - uses: actions-rs/cargo@v1\n        with:\n          use-cross: true\n          command: build\n          args: --target armv7-unknown-linux-gnueabihf\n```\n\n## License\n\nThis Action is distributed under the terms of the MIT license, see [LICENSE](https://github.com/actions-rs/toolchain/blob/master/LICENSE) for details.\n\n## Contribute and support\n\nAny contributions are welcomed!\n\nIf you want to report a bug or have a feature request,\ncheck the [Contributing guide](https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md).\n\nYou can also support author by funding the ongoing project work,\nsee [Sponsoring](https://actions-rs.github.io/#sponsoring).\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-rs%2Fcargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-rs%2Fcargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-rs%2Fcargo/lists"}