Skip to content

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.

  1. File → New project or solution… (Ctrl/⌘+Shift+N), or New in the toolbar.

  2. Choose the type and click Next (or double-click):

    Type What for Main file
    Console app A program used in the terminal src/main.rs
    Window app A program with a graphical interface, designed with the designer ui/app-window.slint and src/main.rs
    Library Code used by other projects (it doesn’t run on its own) src/lib.rs
    Solution A .rxsln file that groups several projects (Solutions) *.rxsln
  3. 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.

  4. 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 the RustProjects folder 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.

  • 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:

Cargo.toml
[package]
name = "my_app"
version = "0.1.0"
edition = "2024"
[dependencies]
rand = "0.9" # the packages you add from Packages

You don’t need to edit it by hand: Packages updates it for you.

  • File → Open folder… opens a project or a folder with several (Raxorin Studio finds every Cargo.toml inside).
  • 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.

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.

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.