One idea
Rust feels strict because the compiler checks your code before users hit bugs. Treat each error as a small task list: where it happened, what Rust expected, and what you can change.
What Cargo gives you
Cargo is Rust’s project tool. It creates the folder, stores project settings, builds your code, runs it, and later helps you add crates.
For your HackIndia submission, Cargo matters because reviewers can clone your repo and run the same commands you ran.
Start a CLI project
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
cargo new rust-attendance-cli
cd rust-attendance-cli
cargo run
cargo checkFirst useful output
Open src/main.rs and replace the starter code. Keep it simple for now. The goal today is to see the edit-check-run loop.
fn main() {
let course = "Data Structures";
let present = 42;
println!("{} attendance count: {}", course, present);
}Use the loop
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
cargo check
cargo runDo not fight every line
Beginners often try to fix all errors at once. That creates more confusion.
Start with the first real error in your file. Later errors may disappear after the first fix.
Read an error
Try this broken code for one minute. It is safe. You are practising how to read the compiler.
fn main() {
let marks = 88
println!("Marks: {}", marks);
}
// Run:
// cargo check
// You should see an error near the missing semicolon.
// Fix it:
// let marks = 88;Ask for help well
When you use ChatGPT, Gemini, or Claude, paste the exact error and the small code block around it. Ask for the smallest fix and the reason.
Check the answer yourself. It should explain the compiler message, not rewrite your full project without asking.
Prompt:
I am learning Rust. Explain this compiler error in simple words.
Give the smallest fix only.
Here is my code and error:
<paste code and cargo check output>Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
git init
git add .
git commit -m "Start Rust CLI project"