Skip to content

feat(challenges): add Rust coding challenges (#1) - #4

Open
fguzman-stack wants to merge 1 commit into
masterfrom
feat/rust-challenges
Open

fguzman-stack wants to merge 1 commit into
masterfrom
feat/rust-challenges

Conversation

@fguzman-stack

Copy link
Copy Markdown
Owner

🎯 What does this PR do?

Adds 10 Rust coding challenges (ids 201-210) to ChallengesData.kt covering ownership, borrowing, Result/Option, slices, iterators, the ? operator and #[derive(Debug)]. Mixes TRIVIA, DEBUG and PRINT types. Also wires Rust as a selectable language in the UI (icon + selector + badges + focus topics).

Closes #1

🧩 Challenges added

  • Ownership / move semantics
  • Borrow conflict (E0502)
  • Moved value (E0382)
  • Result<T,E> and the ? operator
  • Option::unwrap_or, string slices, iterator pipelines, #[derive(Debug)]

All codeSnippets were validated with rustc 1.91 locally (compiling ones build & print the expected output; the two "DEBUG" ones reproduce the exact E0502/E0382 compile errors).

πŸ–ΌοΈ UI wiring

  • ic_lang_rust.xml (rust-orange gear vector) + mapping in TopicIcons.kt
  • Added "Rust" to language selector (SettingsLanguageScreen), badges list (LearnScreen, key RUST), and Focus topics

βœ… Before you submit

  • ./gradlew testDebugUnitTest passes locally (BUILD SUCCESSFUL)
  • No Room schema changes (language is a TEXT key, no migration needed)
  • No secrets/keystores committed
  • Conventional commit title

πŸ§ͺ How to test

  1. Settings β†’ Lenguajes y temas β†’ "Lenguaje Principal" β†’ pick Rust
  2. Aprender β†’ "Retos Normales": solve Rust challenges (trivia/print/debug)
  3. Insignias tab shows a Rust progress row
  4. Focus β†’ topic list includes Rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧩 Add Rust coding challenges

2 participants