Convert Figma logo to code with AI

exercism logorust

Exercism exercises in Rust.

1,440
520
1,440
14

Top Related Projects

96,644

Empowering everyone to build reliable and efficient software.

52,586

:crab: Small exercises to get you used to reading and writing Rust code!

22,076

All Algorithms implemented in Rust

A curated list of Rust code and resources.

:books: Learn to write an embedded OS in Rust :crab:

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.

Quick Overview

The exercism/rust repository is part of the Exercism platform, which provides coding exercises and mentorship for various programming languages, including Rust. This repository contains Rust-specific exercises, test suites, and documentation to help users learn and practice Rust programming through hands-on coding challenges.

Pros

  • Offers a wide range of Rust exercises, from beginner to advanced levels
  • Includes automated tests for each exercise, allowing users to verify their solutions
  • Provides a platform for mentorship and community feedback on solutions
  • Regularly updated with new exercises and improvements

Cons

  • May not cover all aspects of Rust programming in depth
  • Some exercises might be too challenging for absolute beginners
  • Requires an internet connection to submit and receive feedback on solutions
  • The platform's interface can be overwhelming for new users

Getting Started

To get started with the exercism/rust exercises:

  1. Install the Exercism CLI: https://exercism.org/cli-walkthrough
  2. Configure the CLI with your Exercism token
  3. Choose the Rust track on the Exercism website
  4. Download an exercise using the CLI:
    exercism download --exercise=hello-world --track=rust
    
  5. Solve the exercise in the downloaded directory
  6. Run tests using cargo test
  7. Submit your solution:
    exercism submit src/lib.rs
    

Competitor Comparisons

96,644

Empowering everyone to build reliable and efficient software.

Pros of rust

  • Official Rust programming language repository, containing the core language implementation and standard library
  • Extensive documentation and comprehensive test suite for the Rust compiler and standard library
  • Active community with frequent updates and contributions from core developers and external contributors

Cons of rust

  • Large codebase with complex architecture, making it challenging for newcomers to contribute
  • Longer build times due to the size and complexity of the project
  • Steeper learning curve for understanding the internals of the Rust compiler and language implementation

Code comparison

rust:

pub fn compile_crate(sess: &Session, crate_name: &str) -> Result<(), ErrorReported> {
    let (krate, lint_store) = parse_and_prepare(sess, crate_name)?;
    let outputs = run_passes(sess, lint_store, krate)?;
    sess.compile_status()?;
    Ok(())
}

exercism:

pub fn hello() -> String {
    "Hello, World!".to_string()
}

#[test]
fn test_hello_world() {
    assert_eq!("Hello, World!", hello());
}

The rust repository contains complex compiler code, while exercism focuses on simple exercises and tests for learning Rust.

52,586

:crab: Small exercises to get you used to reading and writing Rust code!

Pros of rustlings

  • More focused on Rust-specific concepts and syntax
  • Integrated with the Rust Book, providing a structured learning path
  • Includes automated tests and feedback for each exercise

Cons of rustlings

  • Limited in scope compared to Exercism's broader range of exercises
  • Less emphasis on real-world problem-solving scenarios
  • Fewer community-contributed exercises and solutions

Code Comparison

rustlings example:

fn main() {
    let x = 5;
    println!("x has the value {}", x);
}

Exercism example:

pub fn square_of_sum(n: u32) -> u32 {
    (1..=n).sum::<u32>().pow(2)
}

Summary

rustlings is designed as a companion to the Rust Book, offering a structured approach to learning Rust syntax and concepts. It provides immediate feedback through automated tests, making it ideal for beginners.

Exercism's Rust track offers a broader range of exercises, focusing on problem-solving and real-world scenarios. It provides a platform for community interaction and code review, making it suitable for both beginners and more experienced developers looking to improve their Rust skills.

Both repositories serve valuable purposes in the Rust learning ecosystem, with rustlings excelling in guided, concept-focused learning, and Exercism offering a more diverse and community-driven approach to mastering Rust programming.

22,076

All Algorithms implemented in Rust

Pros of The Algorithms

  • Comprehensive collection of algorithms implemented in Rust
  • Focuses on educational value and understanding various algorithmic concepts
  • Organized by algorithm categories for easy navigation

Cons of The Algorithms

  • Less structured learning path compared to Exercism
  • May lack the interactive feedback and mentorship offered by Exercism
  • Potentially overwhelming for beginners due to the large number of algorithms

Code Comparison

Exercism (example from "hello-world" exercise):

pub fn hello() -> String {
    "Hello, World!".into()
}

The Algorithms (example from "bubble_sort" algorithm):

pub fn bubble_sort<T: Ord>(arr: &mut [T]) {
    for i in 0..arr.len() {
        for j in 0..arr.len() - 1 - i {
            if arr[j] > arr[j + 1] {
                arr.swap(j, j + 1);
            }
        }
    }
}

The code comparison shows that Exercism focuses on smaller, targeted exercises, while The Algorithms provides more complex implementations of specific algorithms. Exercism's approach is more suitable for beginners, while The Algorithms offers a deeper dive into algorithmic concepts for those looking to expand their knowledge of data structures and algorithms in Rust.

A curated list of Rust code and resources.

Pros of awesome-rust

  • Comprehensive collection of Rust resources, libraries, and tools
  • Regularly updated with community contributions
  • Covers a wide range of Rust-related topics and applications

Cons of awesome-rust

  • Lacks hands-on coding exercises for learning Rust
  • May be overwhelming for beginners due to the sheer volume of information
  • Doesn't provide structured learning paths or curriculum

Code comparison

While a direct code comparison isn't relevant for these repositories, here's an example of how they differ in content:

awesome-rust (list of resources):

## Web Programming

* Client
  * [reqwest](https://github.com/seanmonstar/reqwest) — An easy and powerful Rust HTTP Client
  * [ureq](https://github.com/algesten/ureq) — A minimal request library

exercism/rust (coding exercise):

pub fn square_of_sum(n: u32) -> u32 {
    (1..=n).sum::<u32>().pow(2)
}

pub fn sum_of_squares(n: u32) -> u32 {
    (1..=n).map(|x| x.pow(2)).sum()
}

Summary

awesome-rust serves as a comprehensive resource hub for Rust developers, offering a vast collection of tools, libraries, and learning materials. On the other hand, exercism/rust focuses on providing hands-on coding exercises to help learners practice and improve their Rust programming skills. While awesome-rust excels in breadth of information, exercism/rust offers a more structured and interactive learning experience for those looking to enhance their Rust proficiency through practical coding challenges.

:books: Learn to write an embedded OS in Rust :crab:

Pros of rust-raspberrypi-OS-tutorials

  • Focuses on practical, hands-on learning for embedded systems and OS development
  • Provides step-by-step tutorials for building a Raspberry Pi operating system
  • Offers in-depth understanding of low-level programming concepts

Cons of rust-raspberrypi-OS-tutorials

  • More specialized and narrower in scope compared to general Rust exercises
  • Requires specific hardware (Raspberry Pi) for full implementation
  • May be more challenging for beginners without prior OS development experience

Code Comparison

rust-raspberrypi-OS-tutorials:

#[no_mangle]
pub extern "C" fn kernel_main() -> ! {
    // Kernel code here
    loop {}
}

exercism/rust:

pub fn square_of_sum(n: u32) -> u32 {
    (1..=n).sum::<u32>().pow(2)
}

The rust-raspberrypi-OS-tutorials code demonstrates low-level kernel entry point programming, while exercism/rust focuses on general-purpose Rust exercises and algorithms.

rust-raspberrypi-OS-tutorials is ideal for those interested in embedded systems and OS development, offering a deep dive into Raspberry Pi programming with Rust. exercism/rust, on the other hand, provides a broader range of Rust exercises suitable for learners at various levels, focusing on language fundamentals and problem-solving skills.

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.

Pros of comprehensive-rust

  • Offers a more structured, course-like approach to learning Rust
  • Provides in-depth explanations and examples for advanced Rust concepts
  • Includes hands-on exercises and projects integrated into the learning material

Cons of comprehensive-rust

  • Less focus on individual, isolated coding exercises
  • May be overwhelming for absolute beginners due to its comprehensive nature
  • Updates less frequently compared to the regularly maintained exercism/rust

Code Comparison

comprehensive-rust:

fn main() {
    let mut v = Vec::new();
    v.push(1);
    v.push(2);
    v.push(3);
    println!("v: {:?}", v);
}

exercism/rust:

pub fn square_of_sum(n: u32) -> u32 {
    (1..=n).sum::<u32>().pow(2)
}

pub fn sum_of_squares(n: u32) -> u32 {
    (1..=n).map(|x| x.pow(2)).sum()
}

The comprehensive-rust example demonstrates basic vector operations, while the exercism/rust code shows more focused, problem-solving exercises. This reflects the different approaches of the two repositories: comprehensive-rust aims to teach Rust concepts comprehensively, while exercism/rust focuses on practical coding challenges to reinforce learning.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Exercism Rust Track

                          Discourse topics   Exercism_III   CI


Hi.  ðŸ‘‹ðŸ½  ðŸ‘‹  We are happy you are here.  🎉 ðŸŒŸ


exercism/rust is one of many programming language tracks on exercism(dot)org. This repo holds all the instructions, tests, code, & support files for Rust exercises currently under development or implemented & available for students.

Some Exercism language tracks have a syllabus which is meant to teach the language step-by-step. The Rust track's syllabus is a work in progress and it's not activated yet. All exercises presented to students are practice exercises. Students are exepcted to learn the language themselves, for example with the official book, and practice with our exercises.



🌟🌟  Please take a moment to read our Code of Conduct  ðŸŒŸðŸŒŸ
It might also be helpful to look at Being a Good Community Member & The words that we use.
Some defined roles in our community: Contributors | Mentors | Maintainers | Admins


We ðŸ’› ðŸ’™   our community.
But our maintainers are not accepting community contributions at this time.
Please read this community blog post for details.


Here to suggest a new feature or new exercise?? Hooray!  ðŸŽ‰  
We'd love if you did that via our Exercism Community Forum.
Please read Suggesting Exercise Improvements & Chesterton's Fence.
Thoughtful suggestions will likely result faster & more enthusiastic responses from volunteers.


✨ ðŸ¦„  Want to jump directly into Exercism specifications & detail?
     Structure | Tasks | Concepts | Concept Exercises | Practice Exercises | Presentation
     Writing Style Guide | Markdown Specification (✨ version in contributing on exercism.org)



Exercism Rust Track License

This repository uses the MIT License.