rust-incubator icon indicating copy to clipboard operation
rust-incubator copied to clipboard

Learning Rust step-by-step.

Rust Incubator

It wasn’t always so clear, but the Rust programming language is fundamentally about empowerment: no matter what kind of code you are writing now, Rust empowers you to reach farther, to program with confidence in a wider variety of domains than you did before.

Rust Book's Foreword

This project represents a hard-way step-by-step Rust learning course from language basics to a capability of web backend development.

Prerequisites

Toolchain

Bookshelf

Steps

Before you start

Create a new GitHub repository for yourself using this one as template.

NOTE: This learning course is constantly improving and evolving over time.

To be up-to-date with the recent changes in your own copy of this repository, attach the upstream history with the following commands:

git remote add upstream https://github.com/instrumentisto/rust-incubator.git
git fetch upstream main
git merge upstream/main --allow-unrelated-histories

And then, whenever you want to grab some new changes, do the following:

git fetch upstream main
git merge upstream/main

Additionally, to be aware about new changes, you may either watch this repository on GitHub, or even track it via RSS subscription.

Schedule

Each step must be performed as a separate PR (pull request) with an appropriate name and check-marked here in README's schedule after completion. Each step is a Cargo workspace member, so you can run/test it from the project root (i.e. cargo run -p step_1_8). Consider to use rustfmt and Clippy when you're writing Rust code.

  • [ ] 0. Become familiar with Rust basics (3 days)
  • [ ] 1. Concepts (2 days, after all sub-steps)
    • [ ] 1.1. Default values, cloning and copying (1 day)
    • [ ] 1.2. Boxing and pinning (1 day)
    • [ ] 1.3. Shared ownership and interior mutability (1 day)
    • [ ] 1.4. Clone-on-write (1 day)
    • [ ] 1.5. Conversions, casting and dereferencing (1 day)
    • [ ] 1.6. Static and dynamic dispatch (1 day)
    • [ ] 1.7. Sized and ?Sized types (1 day)
    • [ ] 1.8. Thread safety (1 day)
    • [ ] 1.9. Phantom types (1 day)
  • [ ] 2. Idioms (2 days, after all sub-steps)
    • [ ] 2.1. Rich types ensure correctness (1 day)
    • [ ] 2.2. Swapping values with mem::replace (1 day)
    • [ ] 2.3. Bound behavior, not data (1 day)
    • [ ] 2.4. Abstract type in, concrete type out (1 day)
    • [ ] 2.5. Exhaustivity (1 day)
    • [ ] 2.6. Sealing (1 day)
  • [ ] 3. Common ecosystem (2 days, after all sub-steps)
    • [ ] 3.1. Testing and mocking (1 day)
    • [ ] 3.2. Declarative and procedural macros (1 day)
    • [ ] 3.3. Date and time (1 day)
    • [ ] 3.4. Regular expressions and custom parsers (1 day)
    • [ ] 3.5. Collections and iterators (1 day)
    • [ ] 3.6. Serialization and deserialization (1 day)
    • [ ] 3.7. Randomness and cryptography (1 day)
    • [ ] 3.8. Logging and tracing (1 day)
    • [ ] 3.9. Command-line arguments, environment variables and configs (1 day)
    • [ ] 3.10. Multithreading and parallelism (1 day)
    • [ ] 3.11. Async I/O, futures and actors (2 days)
  • [ ] 4. Backend ecosystem (3 days, after all sub-steps)
    • [ ] 4.1. Databases, connection pools and ORMs (1 day)
    • [ ] 4.2. HTTP servers and clients (1 day)
    • [ ] 4.3. API servers, clients and tools (1 day)

More practice