HackIndia Logo
HackathonsNewsSkillsGrowth
HackIndia LogoContact: +91 9910125804

General

  • Companies
  • Colleges
  • Board of Advisors
  • Brand Ambassadors
  • FAQ
  • Contact
  • Report a Bug

Hackathons

  • Upcoming Hackathons
  • Judges
  • Mentors
  • Partners
  • Participating Colleges

Resources

  • About Us
  • Branding
  • Latest News
  • Growth
  • Skills
  • Ecosystem
  • Forum
  • Ideas
  • Prompt Optimizer
  • How to earn XP

© 2026 HackIndia. All rights reserved.

Privacy PolicyTerms of ServiceCode of ConductSitemap

Build 2.139 · 09 Nov 2026, 10:59 UTC

    HackIndia
    HackathonsNewsInternshipsSkillsGrowth
    RustWorking towardsRust
    0%

    0 of 9 steps done · +100 XP · +50 SHARP when it is yours

    1. 1Make the compiler your teammate4 min · +10 XP · +5 SHARP
    2. 2Own values without confusion4 min · +10 XP · +5 SHARP
    3. 3Handle absence and failure cleanly4 min · +10 XP · +5 SHARP
    4. 4Match data into actions4 min · +10 XP · +5 SHARP
    5. 5Share behaviour with traits4 min · +10 XP · +5 SHARP
    6. 6Use crates without chaos4 min · +10 XP · +5 SHARP
    7. 7Build and submit the repo5 min · +10 XP · +5 SHARP
    8. The check10 questions, 7 to pass · +10 SHARP
    9. Hand in the taskA project that uses the skill
    10. Skill and certificate+100 XP · +50 SHARP
    Lesson 1 of 7 4 min

    Rust

    Make the compiler your teammate

    • +10 XP for this lesson
    • +100 XP when the skill is proved
    • 2 learning it right now
    In 30 seconds
    • Create a Rust CLI project with Cargo and run it locally.
    • Read compiler errors as instructions, not as failure.
    Use cargo check, cargo run, and rustc --explain while building.
    Key point

    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.

    Your to-do

    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 check
    Example

    First 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);
    }
    Your to-do

    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 run
    Common mistake

    Do 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.

    Example

    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;
    Tip

    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>
    Your to-do

    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"

    Quick check

    0 of 2 right
    1.You changed main.rs. What should you run first to catch compiler errors quickly?
    2.Cargo shows many errors. What is the best first move?

    Answer the quick check to finish this lesson.

    Skip to lesson 2 →
    Rust
    Working towards
    Rust +100 XP

    0 of 7 lessons done · proved by a project that uses the skill

    See the track