Skip to content

Samples

Raxorin Studio comes with a samples hub: small, complete apps that show how things are done in Rust. Each one explains at the top what it does and what you’ll learn. (The comments in the samples’ code are in Spanish.)

There are two ways to use them:

  • When creating a project: New project → choose the type → Next, and instead of Blank project choose a sample of that type.
  • From the hub, to see them all together:
  1. Open File → Samples… (it’s also on the welcome screen and in Help).
  2. Search or filter by category and choose one. On the right you’ll see what you’ll learn and which files it has.
  3. Choose the name and folder, and click Create and open. A copy of your own is created: change it as much as you like.
  4. Press F5 to run it.

Temperature converter

A window with two fields that update each other. Slint properties and callbacks, layouts. Beginner.

Calculator

A grid keypad and the logic in a struct with tests. GridLayout, enum, Rc<RefCell>. Beginner.

To-do list

Add, check and delete tasks. Lists in Slint with VecModel. Intermediate.

Pomodoro timer

25 + 5 minutes with a progress bar. slint::Timer, Cell. Intermediate.

Control gallery

A clock with Timer, a list, a clickable card with a shadow, a vertical slider and standard buttons, with their events. Intermediate.

Guess the number

The classic console game. Reading the keyboard, loop, match. Beginner.

Word counter

The most frequent words in a text. HashMap, iterators, tests. Beginner.

Game of Life

Conway’s automaton animated in the console. struct, impl, 2D vectors. Intermediate.

Find the bug

A program that computes an average wrong: find the bug with the debugger. Beginner.

Geometry

A library with shapes, a trait and tests (Test button). Intermediate.

Shop

A solution with the inventario library and the caja program. Intermediate.