Skip to content

millsks/rust-practice-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-practice-2025

Introduction

This repository is a personal learning journey through the Rust programming language. The primary goal is to build proficiency in Rust fundamentals, syntax, and best practices. A secondary objective is to explore integrating Rust with Python, enabling high-performance extensions and interoperability between the two languages.

The repository is organized by day/topic, with each directory containing practical examples and exercises that progressively build understanding of Rust concepts.

Repository Structure

rust-practice-2025/
├── LICENSE
├── README.md
├── projects/              # Learning projects organized by topic
│   ├── hello_world/       # Hello World and basic project setup
│   ├── primitiveDataTypes/# Primitive data types (integers, floats, booleans, chars)
│   ├── compoundDataTypes/ # Compound data types (tuples, arrays)
│   └── functions/         # Functions, parameters, and return values
└── rustlings/             # Interactive Rust exercises
    ├── exercises/         # Progressive exercises covering all Rust concepts
    └── solutions/         # Solution files for reference

Installation & Setup

Installing Rust

The recommended way to install Rust is through rustup, the official Rust toolchain installer.

On macOS, Linux, or Unix-like OS:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

On Windows: Download and run rustup-init.exe

After installation, restart your terminal or run:

source $HOME/.cargo/env

Verify installation:

rustc --version
cargo --version

Updating Rust

To update Rust to the latest stable version:

rustup update

Additional Components

Install useful Rust components:

# Rust formatter
rustup component add rustfmt

# Rust linter
rustup component add clippy

# Rust Language Server (for IDE support)
rustup component add rust-analyzer

Uninstalling Rust

If you ever need to uninstall Rust:

rustup self uninstall

Learning Goals

  • Master Rust fundamentals: ownership, borrowing, lifetimes
  • Understand Rust's type system and memory safety guarantees
  • Build proficiency with Rust's tooling (Cargo, rustc, rustfmt, clippy)
  • Explore systems programming concepts
  • Learn Rust-Python interoperability using PyO3 or similar tools

Rustlings: Interactive Learning

Rustlings is a collection of small, focused exercises designed to teach Rust through hands-on practice. It's an official Rust project that helps you learn by reading, writing, and fixing Rust code. Small exercises to get you used to reading and writing Rust code - Recommended in parallel to reading the official Rust book. 📚️

What is Rustlings?

Rustlings provides bite-sized exercises that start simple and gradually increase in complexity. Each exercise is a small Rust program with intentional errors or missing code that you need to fix. The exercises cover core Rust concepts including:

  • Variables and mutability
  • Functions and control flow
  • Data types and structures
  • Ownership, borrowing, and lifetimes
  • Error handling
  • Traits and generics
  • Testing and much more

How to Use Rustlings

  1. Installation:

    curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash

    Or with Cargo:

    cargo install rustlings
  2. Getting Started:

    rustlings init
    cd rustlings
    rustlings watch
  3. Working Through Exercises:

    • Run rustlings watch - it will automatically check your solutions as you save files
    • Open exercises in your editor (located in the exercises/ directory)
    • Read the instructions and hints in each file
    • Fix the code to make the tests pass
    • Use rustlings hint <exercise_name> if you get stuck
    • Progress through exercises sequentially or jump to specific topics
  4. Key Commands:

    • rustlings watch - Auto-check solutions as you work
    • rustlings verify - Check all exercises at once
    • rustlings run <exercise_name> - Run a specific exercise
    • rustlings hint <exercise_name> - Get a hint for an exercise
    • rustlings list - Show all exercises and their status

Why Rustlings?

  • Learn by doing: Active practice reinforces concepts better than passive reading
  • Immediate feedback: The watch mode provides instant feedback on your solutions
  • Structured progression: Exercises build on each other logically
  • Complements The Book: Works perfectly alongside reading The Rust Programming Language
  • Low commitment: Each exercise takes just a few minutes, perfect for quick learning sessions

References

Official Rust Resources

Additional Learning Resources

Rust-Python Integration

  • PyO3 - Rust bindings for Python, enabling Rust extensions for Python
  • maturin - Build and publish Rust-based Python packages
  • rust-cpython - Alternative Rust bindings for Python

Community and Tools

Progress Tracking

Project Topic Status
hello_world Hello World, Project Setup ✅ Complete
primitiveDataTypes Primitive Data Types (integers, floats, booleans, chars) ✅ Complete
compoundDataTypes Compound Data Types (tuples, arrays) ✅ Complete
functions Functions, Parameters, Return Values ✅ Complete

Last updated: November 24, 2025

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages