Add new items to Cargo projects
RustRover makes it easy to add new items to your project, be it Cargo crates, directories, Rust files, or files with other extensions.

Create a new Rust file
In the Project tool window (Alt+1), select the node in which you want to create the file, click
on the toolbar, and select .
Alternatively, select the necessary node, press Alt+Insert, and select Rust File.
In the dialog that opens:
Specify the file name
Choose whether you want to attach the new file to the current module
If you select Attach to module, RustRover will add the file declaration to the module's target (
main.rs
orlib.rs
). If RustRover fails to identify the appropriate target, the file won’t be attached.
If you open a Rust file that is not attached to any module, RustRover will display a banner suggesting to attach it to the current module's target.

Create a Cargo crate
In the Project tool window (Alt+1), select the node in which you want to create the crate, click
on the toolbar, and select .
Alternatively, select the necessary node, press Alt+Insert, and select Cargo Crate.
Name the new crate and select its type (Binary or Library).
Create a file of an arbitrary type
In the Project tool window (Alt+1), right-click the node in which you want to create a new file and click .
Alternatively, select the node and click
on the toolbar or press Alt+Insert. Then select File.
Name the new file and specify its extension, for example: File.js, and press Enter.
Create a scratch file
Go to
or press Ctrl+Alt+Shift+Insert.Alternatively, in the Project tool window (Alt+1), click
on the toolbar and select .
Select the language of the scratch file.
Scratch files of the same type are automatically numbered and added to the Scratches and Consoles directory of the Project view.
Create a new directory
In the Project tool window (Alt+1), right-click the node in which you want to create a new directory and select .
Alternatively, select the node and click
on the toolbar or press Alt+Insert. Then select Directory.
Name the new directory and press Enter.
If you want to create several nested directories, specify their names separated with slashes, for example: folder/resources.