Rullst AcademyRullst Academy/Lesson
Rust: first sparks · Lesson 05 / 06

Cargo prepares the trip

You can recognize a small program. Now organize the journey from creating a project to seeing its message on a computer.

Learning paths5 min

Let's discover together

  1. 1

    Cargo comes with the usual Rust installation. cargo new signal creates a folder named signal with Cargo.toml and src/main.rs. You need not install anything for this activity.

  2. 2

    Inside the project folder, we edit src/main.rs and save it. Cargo.toml describes the project and its dependencies; it is not where the println! message belongs.

  3. 3

    cargo run compiles when needed and runs the program. cargo check checks compilation without producing the final executable. This mission needs the message, so we use run.

✦
YOUR MISSION

Order the creation, editing and running of a Cargo project.

Now it's your turn

Discovery workshop

Build the launch sequence

You begin in a folder without the signal project. Arrange the cards to create and run the new message.
  1. Run cargo run.
  2. Edit src/main.rs and save.
  3. Create with cargo new signal.
  4. Enter with cd signal.
Build your answers and check when you are ready.
A moment to understand

Which file contains this mission’s program?

I need a hint

Cargo.toml describes the project. Look inside src to find the program.

Loading your journey…

Take it with you

Explain the sequence using four paper cards. When trying it on a computer, consult the official installation instructions and ask for help if needed.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.