Skip to content
📦 GitHub Action for Rust `cargo` command
TypeScript JavaScript
Branch: master
Clone or download
dependabot-preview Bump typescript from 3.6.4 to 3.7.2
Bumps [typescript]( from 3.6.4 to 3.7.2.
- [Release notes](
- [Commits](microsoft/TypeScript@v3.6.4...v3.7.2)

Signed-off-by: dependabot-preview[bot] <>
Latest commit 0362540 Nov 11, 2019

Rust cargo Action

MIT licensed Gitter

This GitHub Action runs specified cargo command on a Rust language project.

Example workflow

on: [push]

name: CI

    name: Rust project
    runs-on: ubuntu-latest
      - uses: actions/checkout@master
      - uses: actions-rs/cargo@v1
          command: build
          args: --release --all-features

See additional recipes here.


Name Required Description Type Default
command Cargo command to run, ex. check or build string
toolchain Rust toolchain name to use string
args Arguments for the cargo command string
use-cross Use cross instead of cargo bool false

Virtual environments

Note that cargo is not available by default for some virtual environments; for example, as for 2019-09-15, macOS env is missing it.

You can use actions-rs/toolchain to install the Rust toolchain with cargo included.


In order to make cross-compilation an easy process, this Action can install cross tool on demand if use-cross input is enabled; cross executable will be invoked then instead of cargo automatically.

All consequent calls of this Action in the same job will use the same cross installed.

on: [push]

name: ARMv7 build

    name: Linux ARMv7
    runs-on: ubuntu-latest
      - uses: actions/checkout@master
      - uses: actions-rs/toolchain@v1
          toolchain: stable
          target: armv7-unknown-linux-gnueabihf
          override: true
      - uses: actions-rs/cargo@v1
          use-cross: true
          command: build
          args: --target armv7-unknown-linux-gnueabihf
You can’t perform that action at this time.