• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. Review Bot 4.x
    2. Version 4.x
    3. Version 3.0
    4. Version 2.0
    5. Version 1.0
    6. Review Bot Tools
    7. Cargo Tool
  • Home
  • Installation
  • Manually Installing Review Bot
  • Review Bot Docker Images
  • Upgrading Review Bot
  • Configuring Review Bot
  • Review Bot Tools
  • Cargo Tool
  • Checkstyle
  • Clang Static Analyzer
  • Cppcheck
  • Cpplint
  • Doc8
  • FBInfer
  • Flake8
  • Go Fmt
  • Go Tool
  • JSHint
  • PMD
  • Pycodestyle
  • Pydocstyle
  • Pyflakes
  • RuboCop
  • Rust Fmt
  • Secret Scanner
  • ShellCheck
  • Module and Class Reference
  • reviewbot.tools.base
  • reviewbot.tools.base.mixins
  • reviewbot.tools.base.registry
  • reviewbot.tools.base.tool
  • reviewbot.testing.testcases
  • reviewbot.testing.utils
  • reviewbot.tools.testing
  • reviewbot.tools.testing.decorators
  • reviewbot.tools.testing.testcases
  • reviewbot.processing.review
  • reviewbot.utils.api
  • reviewbot.utils.filesystem
  • reviewbot.utils.log
  • reviewbot.utils.process
  • reviewbot.utils.text
  • reviewbot.celery
  • reviewbot.config
  • reviewbot.deprecation
  • reviewbot.errors
  • reviewbot.repositories
  • reviewbot.tasks
  • reviewbot.tools.cargotool
  • reviewbot.tools.checkstyle
  • reviewbot.tools.clang
  • reviewbot.tools.cppcheck
  • reviewbot.tools.cpplint
  • reviewbot.tools.doc8
  • reviewbot.tools.fbinfer
  • reviewbot.tools.flake8
  • reviewbot.tools.gofmt
  • reviewbot.tools.gotool
  • reviewbot.tools.jshint
  • reviewbot.tools.pmd
  • reviewbot.tools.pycodestyle
  • reviewbot.tools.pydocstyle
  • reviewbot.tools.pyflakes
  • reviewbot.tools.rbsecretscanner
  • reviewbot.tools.rubocop
  • reviewbot.tools.rustfmt
  • reviewbot.tools.shellcheck
  • General Index
  • Python Module Index
  • Release Notes
  • Cargo Tool¶

    New in version 3.0.

    The Cargo Tool utilizes functionality from the Cargo toolchain to test and check Rust code for errors and suspicious constructs. Bugs and abnormal code constructs detected by this tool can be intercepted before they have shipped to users, preventing crashes and poor performance in production.

    Lint checks are performed using cargo clippy, and unit tests are performed using cargo test.

    Supported File Types¶

    The following are supported by this tool.

    • Rust: *.rs

    Installation¶

    Installing Rust and Cargo¶

    This tool requires that Rust/Cargo is installed on the system running the Review Bot worker. Rust/Cargo is available for download on Linux/Mac/Windows.

    See the Rust installation guide for instructions.

    Installing Clippy¶

    In order to use the linting feature, the Cargo component clippy must be installed and configured. Review Bot currently requires this to be installed even if you don’t intend to use this feature.

    To install Clippy, run:

    rustup component add clippy
    

    See the Clippy documentation for more information.

    Configuration¶

    Cargo Location¶

    If the cargo command is in a non-standard location, and can’t be found in Review Bot’s PATH environment variable, then you’ll need to specify the path in the Review Bot worker config file:

    exe_paths = {
        'cargo': '/path/to/cargo',
        'cargo-clippy': '/path/to/cargo-clippy',
    }
    

    You will need to restart the Review Bot worker after making this change.

    Enabling Full Repository Access¶

    This tool requires full repository access, which is available for Git and Mercurial repositories. Each repository you intend to use must be configured in the Review Bot worker config file.

    See Full Repository Access for instructions.

    Enabling Cargo Tool in Review Board¶

    First, you’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).

    The following configuration options are available:

    Check and lint code:

    Enable this checkbox if you want to perform lint checks on uploaded Rust code.

    This will run cargo clippy on the code.

    Run tests:

    Enable this checkbox if you want to run unit tests on uploaded Rust code.

    Note that this can take some time, depending on the size of the codebase.

    This will run cargo test on the code.

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • Supported File Types
    • Installation
      • Installing Rust and Cargo
      • Installing Clippy
    • Configuration
      • Cargo Location
      • Enabling Full Repository Access
      • Enabling Cargo Tool in Review Board