Quick start guide
New to RustRover? This guide will help you explore the IDE's workspace and features and try out all the main aspects of the Rust development process.
1. Open or create a Rust project
You have three options to start working on a project inside RustRover:
Create a new Cargo project
Do one of the following:
Click New Project on the Welcome screen.
Selectfrom the main menu.
Click the Project widget in the main window header and select New Project.
In the left-hand pane, select Rust.
Specify the project location and name.
Specify the location of the Rust toolchain and standard library. If installed, RustRover will detect them automatically.
Select the desired project template and click Create.
Open a local Cargo project
Go to Cargo.toml file (or select Cargo.toml itself):and select the directory containing the root
In the dialog that opens, select Open as project.
When opening the project for the first time, RustRover will prompt you to confirm that you consider it safe.
Click Trust Project if you are certain the project poses no threats and you would like to enable all RustRover features. If you have any doubts, select Preview in Safe Mode. For more information, refer to Project security.
Clone a repository from VCS
Go to Get from VCS on the Welcome screen.or click
Specify the repository URL and the destination directory. Click Clone:
2. Explore the workspace and features
RustRover's feature set is designed to simplify the Rust development process. Let's take a closer look at what it has to offer.
Syntax highlighting and code reference
Here are some shortcuts you may find useful:
Go to declaration
Get type info
For more information, refer to Code reference information.
Code analysis and error reporting
To help you fight errors and inconsistencies in code, RustRover offers built-in inspections and integrates with external linters.
For a summary of all detected problems, use the Inspections widget in the upper-right corner of the editor. To see the details, click the Inspections widget and refer to the Problems tool window (or select ):
Inspections run on the fly for all files currently open in the editor. You can also run them manually for a larger scope. To view inspection results, use the Problems tool window ( ).
RustRover will suggest quick-fixes and intentions where possible. Quick fixes are marked with a red bulb () and address errors. Intentions are marked with a yellow bulb () and suggest possible enhancements and optimizations.
Apply a quick fix/intention
Hover over the problematic code and press Alt+Enter (or click /).
Select the preferred action from the list.
For more information, refer to Intentions and quick-fixes.
Check external linter settings
To check which linter is enabled and whether it runs on the fly, hover over the linter widget in the status bar:
To make changes, click the widget. It will open external linter settings.
Run external linter
Before proceeding, check whether on-the-fly analysis is turned on or off.
If on-the-fly analysis is turned on, you don't need to trigger the linter – it is already running in the background.
If on-the-fly analysis is turned off, to call the linter, open the Cargo tool window ( ) and click .
Information about detected issues will appear in the Problems tool window, together with inspection results.
For more information, refer to External linters.
Enable (or disable) Rustfmt instead of the built-in formatter
Open settings by pressing Control+Alt+S and navigate to
To enable Rustfmt, set the Use rustfmt instead of built-in formatter checkbox. To disable Rustfmt, clear the checkbox.
Click OK to apply the changes.
Reformat a file
Open the file you want to reformat in the editor.
Press Control+Alt+Shift+L or select.
In thedialog, select additional options if necessary and click .
The Cargo tool window
The Cargo tool window is designed to help you with Cargo tasks. By default, it is pinned to the tool windows bar. You can show or hide it by clicking the window indicator on the sidebar.
Use the top panel to:
For more information, refer to Cargo tool window.
Sharing code in Playground
You can share your code in Rust Playground without leaving the editor.
Share in Playground
Select the code fragment you'd like to share (otherwise, the IDE will copy the whole file).
Right-click and choose.
RustRover will create a GitHub Gist and display a notification popup with a link to the playground.
For a brief overview of RustRover features, check out this video:
3. Build and run
Use the Build action to compile your code and Run to execute it. There are several ways to perform these actions:
Build/run Rust code
To build or run a particular target, open the Cargo tool window ( ) and double-click the target.
To run from a particular entry point, locate it in the editor, click in the gutter, and select Run:
To run a particular file or module, open the Project view, right-click the necessary file or module, and select Run:
If you want to build or run code using a predefined configuration (with custom parameters and settings), select it in the switcher on the main toolbar and:
click to build (Control+F9)
click to run (Shift+F10)
You can always build/run using a Cargo command.
For more information, refer to Building and running.
Start a debug session
To start debugging from a particular entry point, locate it in the editor, click in the gutter, and select Debug:
To debug code using a predefined configuration (with custom parameters and settings), select it in the configuration switcher on the main toolbar and click :
You can always start a debug session by running a Cargo command.
For more options, see Start a debug session.
Learn how to perform basic debugging actions from these guides:
Useful debugger shortcuts
View breakpoint details/all breakpoints
Debug code at caret
Shift+F9 (within the
For more information, refer to the Debug section.
You will likely support your code with tests, doctests, and/or benchmarks. Here are a few quick ways to run them:
Run test(s), doctest(s), or benchmark(s)
To run a single test or doctest, open it in the editor, click in the gutter, and select Run:
To run a test/benchmark target, open the Cargo tool window ( ) and double-click the target:
You can always run tests using a Cargo command.
The Run tool window will open, automatically displaying the results:
For more information, refer to the Test section.
6. Run with coverage
RustRover allows you to explore code coverage statistics.
Run with Code Coverage
To get code coverage statistics, do one of the following:
Locate the program entry point, click in the gutter, and select Run with Coverage:
If you want to run a predefined configuration (with custom parameters and settings), select it in the switcher on the main toolbar and press :
The Coverage tool window will open, automatically displaying the results:
Tune RustRover settings
You can customize RustRover functionality to match your own needs. Here are some of the available customizations: