Vibe Engines
YouTube

Lesson 1.1 · 6 min

What a program is

A computer is fast and completely literal. It does not guess what you meant: it does step one, then step two, then step three. A program is just that list of steps. Everything else in this course is a way of writing better lists.

Adds to ChatterboxNothing yet: you read the finished program first.

A list of steps

Think of a recipe. "Boil water. Add pasta. Wait eight minutes." Whoever follows it does the steps in order and does exactly what is written. A program is a recipe for a computer, except the computer has no common sense, so every step has to be spelled out.

Here is the smallest useful Rust program. You can run it right here: press Run.

The smallest program
fn main() {
println!("Hello from Chatterbox");
}
$ cargo run
Hello from Chatterbox

Three lines, and every piece has a job:

  • fn main() means "the program starts here". Every Rust program has exactly one main.
  • The curly braces { } hold the steps that belong to main.
  • println!("…") is one step: print this text, then start a new line. The ; at the end marks where a step finishes, like a full stop.
PredictSteps run in order
fn main() {
println!("2 + 2 =");
println!("{}", 2 + 2);
}

What does the second line of output say?

  • 4
  • 2 + 2
  • 22
Reveal the answer

The program prints: 4 The first step prints the text 2 + 2 =. The second step prints the result of working out 2 + 2, which is 4. The {} is a hole that the value after the comma fills in. We will use that a lot.

Writing is not running

What you type is just text, and a computer cannot run text. Rust has a helper called the compiler that reads your text and turns it into a real program the computer can run. That translation is called compiling.

So there are two moments: the compiler reads your code (compile time), then the program does its steps (run time). Rust is strict at the first moment so that very little goes wrong at the second. If something in your text does not make sense, the compiler tells you before the program ever starts. You will see that in a few minutes, and by the end of the course you will like it.

What we are building

Over the course you will build one program, a small chat client called Chatterbox. It runs in a terminal and, by the last chapter, talks to a real AI model. Each lesson teaches one idea and ends with that idea added to Chatterbox, so you learn Rust by using it.

This is a mock-up of the finished thing, so you know where we are heading. It is not real yet:

Mock-up of Chatterbox at the end of the course
$ cargo run
Chatterbox v1.0 (type /quit to leave)
what is Rust good at?
bot> Programs that need to be fast and not crash: servers, tools, and the parts of AI systems that move a lot of data.
/quit
Self-check

Say it out loud, then reveal

Self-checkRetrieval beats re-reading
In one sentence, what is a program?Reveal
A list of steps that a computer follows exactly, in order.
What does fn main() mark?Reveal
The place where the program starts. Every Rust program has one.
What is the difference between compiling and running?Reveal
Compiling is the compiler turning your text into a real program. Running is that program doing its steps.

That is lesson 1.1. Tick it off so the course remembers where you are.

Learn Rust by building a chat app · Lesson 1.1 · every compiler message above is real output from rustc 1.99.0 (b940084d7 2026-09-28) (edition 2024) · Vibe Engines · 2026