My Rust Programming Journey: Take 2 🫢

So guess who started learning Rust again 🫢... If you are following me, you probably know that I started a series on learning rust back in 2021 but didn't pursue it. We are now in 2025 and I'm rebooting the series.

Wow.

Reading that post from January 2021 is a trip. I was so excited. And then... life happened and my Rust journey just... stopped.

But for the last few months, I've had that itch again. That feeling that Rust is something I need to learn, especially with my new project idea I'm starting in 2026.

So, I'm rebooting the series.

This is my "Learn in Public" journey, take two. I'll be sharing daily updates on X, and I'll post a weekly summary here on the blog.

Welcome to Week 1.

Week 1: Back to "Hello, World!"

My goal this week wasn't to change the world. It was just to get my feet wet again.

I decided to start from scratch, assuming I knew nothing. With a language like Rust, I've learned you can't be arrogant. You have to respect the fundamentals.

Step 1: The Setup

First, I got the environment running. This part, at least, is just as easy as I remember. The Rust team has done an amazing job with

rustup
.

I got the latest stable rust compiler, installed the rust-analyzer in VS Code (which is so good), and I was ready.

Step 2: The Famous Guessing Game

Instead of just re-reading, I jumped right into the "Guessing Game" tutorial from the official Rust book.

And I'm so glad I did.

This little CLI program is the perfect "Chapter 2" for any language. It's not just "Hello, World!"; it forces you to actually do stuff.

In the span of one tiny project, I had to:

  • Use an external "crate" (package) for the first time (

    rand
    ).

  • Handle standard user input (

    io::stdin
    ).

  • Do a real type conversion... and actually handle the error (

    .parse()
    ).

  • Use a match expression (which I already love).

  • Use loop for control flow.

If you are curious, here is the code of the little guessing game:

rust
use std::cmp::Ordering;
use std::io;
use rand::Rng;

fn main() {
    println!("Guess the number!");

    let secret_number = rand::thread_rng().gen_range(1..=100);

    loop {
        println!("Please enter your guess:");

        let mut guess = String::new();

        io::stdin()
            .read_line(&mut guess)
            .expect("Failed to read your guess!");

        let guess: u32 = match guess.trim().parse() {
            Ok(num) => num,
            Err(_) => continue,
        };

        println!("You guessed: {}", guess);

        match guess.cmp(&secret_number) {
            Ordering::Less => println!("Too small!"),
            Ordering::Greater => println!("Too big!"),
            Ordering::Equal => {
                println!("You win!");
                break;
            },
        }
    }
}
```

The code compiles and does exactly what it is supposed to do. It's a brilliant way to get your hands dirty, and it felt great to have a real, working program running in just a few minutes.

Step 3: Common Programming Principles

After the game, I went back to the "book" and worked through the chapter on common concepts: variables, data types, functions, and control flow.

Coming from Python, TypeScript, and C#, a lot of this felt familiar. But the differences are what's so interesting.

Immutability by default (let vs. let mut) is a game-changer. It feels so much... safer. It's a small thing that I can tell forces you to be more intentional about your code.

The other thing that's starting to click is how Rust treats almost everything as an expression. The fact that an if block can return a value is a neat concept that I'm still getting used to.

And one last thing that I found interesting is that, while working on a Rust project, you can access the documentation of any package in your

Cargo.toml
file by just running
cargo doc --open

Conclusion

Honestly? It feels humbling, but also really exciting.

I haven't even gotten to the hard part yet. The ownership concept is up for next week, and I know that "fight" is coming. I'm still in the honeymoon phase.

But for now, I'm just enjoying being a student again. It felt good to write that!

Related articles

My Rust Programming Journey: Part 1 - Getting started

A week ago I started learning the Rust Programming Language.

Date
·4 min read

Copyright © 2025 Valery Melou.