Rust CameroonFR
All articles

Field guide

Your first Rust project with Cargo

Start with a tiny command-line greeting, then make the compiler part of your editing loop.

2 Dec 2026 / Rust Cameroon

With Rust and Cargo installed, open a terminal in the directory where you keep your projects.

cargo new bonjour
cd bonjour
cargo run

Cargo creates a package manifest and a small program in src/main.rs. Open that file and change the greeting inside println! to a message in a language you speak. Run it again to see your edit.

Let the compiler help

Remove the closing parenthesis from the greeting and run cargo check. Read the first diagnostic, repair the line, and check again. This gives you a quick feedback loop without building the final executable.

For the next exercise, follow the Rust Book and turn your greeting into a program that asks for a name.

Comments

Share your thoughts with the community on GitHub.