Projects and files
A Rust project is a folder with a Cargo.toml file. Rust calls it a crate (package) and builds it with
Cargo, the official tool. Raxorin Studio creates, opens and builds normal Cargo projects: you can also open them
with any other editor or from the terminal.
Creating a project
Section titled “Creating a project”-
File → New project or solution… (Ctrl/⌘+Shift+N), or New in the toolbar.
-
Choose the type and click Next (or double-click):
Type What for Main file Console app A program used in the terminal src/main.rsWindow app A program with a graphical interface, designed with the designer ui/app-window.slintandsrc/main.rsLibrary Code used by other projects (it doesn’t run on its own) src/lib.rsSolution A .rxslnfile that groups several projects (Solutions)*.rxsln -
Choose how to start: Blank project, or one of the samples of that type. A sample is copied with the name you choose: it’s yours and you can change everything.
-
Name and location. A project’s name can only have letters, numbers,
_and-, and it can’t start with a number (it’s the crate’s name). By default it’s saved in theRustProjectsfolder in your user folder.
If you already have a project or a solution open, you can add the new project to the current folder or solution instead of creating it separately. The template’s code (texts and comments) comes in the interface’s language.
What’s inside
Section titled “What’s inside”Directorymy_app/
- Cargo.toml the name, the version and the packages it uses
- Cargo.lock exact versions of the packages (generated by Cargo)
- build.rs window apps only: builds the .slint interface
Directorysrc/
- main.rs the program (or lib.rs in a library)
Directoryui/
- app-window.slint the window (window apps only)
Directorytarget/ what the build produces (don’t edit it or push it to Git)
- …
Cargo.toml is the equivalent of Visual Studio’s .csproj:
[package]name = "my_app"version = "0.1.0"edition = "2024"
[dependencies]rand = "0.9" # the packages you add from PackagesYou don’t need to edit it by hand: Packages updates it for you.
Opening projects
Section titled “Opening projects”- File → Open folder… opens a project or a folder with several (Raxorin Studio finds every
Cargo.tomlinside). - File → Open solution… opens a
.rxsln. You can also double-click the file. - File → Open recent remembers what you opened last. With Settings → Startup and running it reopens by itself on startup.
The Explorer
Section titled “The Explorer”It shows the project’s files. With a right-click:
| On… | Actions |
|---|---|
| A folder or project | New file, New folder, Copy path |
| A file | Open, Rename, Delete (goes to the trash), Copy path or relative path |
| A project | Set as startup project, Manage packages, Add project reference |
| The solution | Add new or existing project, Remove from solution |
You can drag files to move them. Changes made outside Raxorin Studio (for example from the terminal or Git) show up by themselves.
The startup project
Section titled “The startup project”When there are several projects, the startup project (in bold, with ▷) is the one that’s run and debugged with F5. Change it with right-click → Set as startup project, or from the selector in the toolbar. Libraries can’t be the startup project: they don’t run on their own.