The best Intermediate Rust course out there!

Overview

Ultimate Rust 2: Intermediate Concepts

This is the companion repository for the Ultimate Rust 2: Intermediate Concepts (the followup to the popular Ultimate Rust Crash Course). UR2IC will be published independently online in the second half of 2021 and is also presented live as part of some O'Reilly virtual events such as Rust in 3 Weeks, or taught in-person for corporate training. You will get the most out of this training experience by doing the exercises in this repository and watching (or attending) the instructor-led training.

In other words, this repository is for you hands-on-learners!

I use macOS, and that is what I developed this course on. Everything ought to work similarly on major Linux distributions and Windows. Please contact me ASAP if you have trouble with anything on this page.

Just getting started with Rust? Check out the prerequisite for this course: Ultimate Rust Crash Course

Install Rust & Prepare Your Development Environment

Rust is required for this course! The latest stable version is always recommended. See the repository for the previous course for instructions on how to install Rust, prepare your development environment, and helpful resources.

Exercises

Please clone this repository! These exercises are designed as Rust projects for you to edit on your own computer.

The exercises are separate Rust projects inside the exercises/ subdirectory. For each exercise, you should:

  • Open the correspondingexercise/EXERCISE_NAME directory in your IDE/Editor
  • Navigate to the same directory with your Terminal application (so you can run cargo run, etc.)
  • Open up the src/main.rs file.
  • Follow the numbered exercise instructions in the code comments.

If you encounter any problems with the exercises, please feel free to use the online course communication tools to contact me, or open an discussion. Either way. 😄

For your convenience, here is a list of all the exercises, with links to view the code on GitHub.

Examples

This course goes over a lot of code in lecture format. Much of the code from the lectures can be found in the example/ directory in this repository.

Contribution

All contributions are assumed to be dual-licensed under MIT/Apache-2.

License

Distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See license/APACHE and license/MIT.

Sponsor

If you like Rusty Engine, please consider sponsoring me on GitHub or on Patreon. 💖

You might also like...
Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem

Simple autoclicker written in Rust, to learn the Rust language.

RClicker is an autoclicker written in Rust, written to learn more about the Rust programming language. RClicker was was written by me to learn more ab

Rust programs written entirely in Rust

mustang Programs written entirely in Rust Mustang is a system for building programs built entirely in Rust, meaning they do not depend on any part of

Rust 核心库和标准库的源码级中文翻译,可作为 IDE 工具的智能提示 (Rust core library and standard library translation. can be used as IntelliSense for IDE tools)

Rust 标准库中文版 这是翻译 Rust 库 的地方, 相关源代码来自于 https://github.com/rust-lang/rust。 如果您不会说英语,那么拥有使用中文的文档至关重要,即使您会说英语,使用母语也仍然能让您感到愉快。Rust 标准库是高质量的,不管是新手还是老手,都可以从中

A library for extracting #[no_mangle] pub extern "C" functions (https://docs.rust-embedded.org/book/interoperability/rust-with-c.html#no_mangle)

A library for extracting #[no_mangle] pub extern "C" functions In order to expose a function with C binary interface for interoperability with other p

clone of grep cli written in Rust. From Chapter 12 of the Rust Programming Language book

minigrep is a clone of the grep cli in rust Minigrep will find a query string in a file. To test it out, clone the project and run cargo run body poem

Rust-blog - Educational blog posts for Rust beginners

pretzelhammer's Rust blog 🦀 I write educational content for Rust beginners and Rust advanced beginners. My posts are listed below in reverse chronolo

The ray tracer challenge in rust - Repository to follow my development of
The ray tracer challenge in rust - Repository to follow my development of "The Raytracer Challenge" book by Jamis Buck in the language Rust

The Ray Tracer Challenge This repository contains all the code written, while step by implementing Ray Tracer, based on the book "The Ray Tracer Chall

Learn-rust-the-hard-way - "Learn C The Hard Way" by Zed Shaw Converted to Rust

Learn Rust The Hard Way This is an implementation of Zed Shaw's Learn X The Hard Way for the Rust Programming Language. Installing Rust TODO: Instruct

Comments
  • Thread_channels challenge question

    Thread_channels challenge question

    Can you kindly have a look at that when your time allows?

    https://github.com/Dajamante/Rustbook/blob/c81d0d2d33431eb7af810dfbd22145a66c95b08d/threads_channels/src/main.rs#L53

    My second receiver channels does not receive any message. The compiler gives me a faire warning:

    
    88 | /         child_rx2
    89 | |             .into_iter()
    90 | |             .map(|m| info!("Message dropped {}", m));
       | |_____________________________________________________^
       |
       = note: `#[warn(unused_must_use)]` on by default
       = note: iterators are lazy and do nothing unless consumed
    

    Thank you a lot in advance!

    opened by Dajamante 5
  • Question: Eat your cake and have it too!

    Question: Eat your cake and have it too!

    Dear Nathan,

    Is it possible to change the From impl into an Into implementation? (impl Into<Cake> for Party)? You said that From/Into were mirrors of each other. Would that even make sense?

    impl From<Party> for Cake {
        fn from(party: Party) -> Self {
            party.cake
        }
    }
    smell_cake(party);
    
    pub fn smell_cake<T: Into<Cake>>(something: T) {
        println!("Hmm...something smells like a {:?} cake!", something.into());
    }
    
    opened by Dajamante 3
  • Truncated code listing in class::resource::slides

    Truncated code listing in class::resource::slides

    Hi,

    There is formatting issue with code listing in the class handout slides (pdf). The line spacing between code lines seems to be too large. A long code listing can thus be truncated and becomes incomplete. Please see the following example excerpt:

    image

    It will be very much appreciated if the formatting issue can be fixed.

    Many thanks!

    opened by BonjourGit 1
  • Challenge clarification for

    Challenge clarification for "errors" exercise

    ultimate_rust2/exercise/errors

    Based on the description:

            // Challenge: Change main() so that it returns a Result, and instead of handling the error   
            // that play_time returns, use the try operator to only handle the success condition. How   
            // does the output of the program change?   
    

    the following change is made:

    fn main() -> Result<()> {   
        ...   
        for dolphin in &dolphins {   
            let responses = play_time(dolphin)?;   
            println!("{} did a FABULOUS PERFORMANCE!", dolphin.name);   
            for response in responses {   
                println!("  {}", response);   
            }   
        }   
        Ok(())   
    }   
    

    It changes the output of the program to: Error: The dolphin's name is too long and annoying to say

    Did I understand the challenge correctly and was it the correct solution? Or anything should be done to explicitly ignore the error Result returned by play_time() and yet to consume the Ok Result? Please advise.

    opened by BonjourGit 1
Owner
Nathan Stocks
Rust Instructor & Indie Game Dev. Author of Rusty Engine. Game ecosystem contributor. Family, Food, Rust, Python, Game Engines, Open Source, Maple Trees.
Nathan Stocks
Bril: A Compiler Intermediate Representation for Learning

Bril: A Compiler Intermediate Representation for Learning Bril (the Big Red Intermediate Language) is a compiler IR made for teaching CS 6120, a grad

Lesley Lai 0 Dec 5, 2022
This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone.

Comprehensive Rust ?? This repository has the source code for Comprehensive Rust ?? , a four day Rust course developed by the Android team. The course

Google 5.2k Jan 3, 2023
Free Rust 🦀 course in English 🇬🇧

Learn Rust ?? Free Rust ?? course in English ???? This course was inspired by Dcode Before starting to learn a programming language, you need to under

Skwal 10 Jul 5, 2022
Rust Crash Course, by BPB Publications

Rust Crash Course Grasp the fundamentals of programming in Rust and put your knowledge to use. This is the repository for Rust Crash Course ,published

BPB Online 9 Nov 26, 2022
Course Material for Ardan Labs - Ultimate Rust: Foundations

Ultimate Rust 1: Foundations Presented by Ardan Labs, Ultima Rust: Foundations gives you a "zero to hero" class to get you started with Rust. You'll l

Herbert 9 Mar 8, 2023
P523 is a classic compiler course taught by R. Kent Dybvig.

P523 is a classic compiler course taught by R. Kent Dybvig. This repo implements the course using Rust, provides a framework to help you master P523.

Sirius Demon 44 Dec 26, 2022
A tool & library to help you with the compiler course.

Compiler Course Helper Support: eliminate left recursion (require grammar with no cycles or ϵ-production) calculate nullable, first sets, follow, sets

水夕 4 May 2, 2022
fast rust implementation of online nonnegative matrix factorization as laid out in the paper "detect and track latent factors with online nonnegative matrix factorization"

ONMF status: early work in progress. still figuring this out. code still somewhat messy. api still in flux. fast rust implementation of online nonnega

null 2 Apr 10, 2020
An actors library for Rust and Tokio designed to work with async / await message handlers out of the box.

Akt An actors framework for Rust and Tokio. It is heavily inspired by Actix and right now it has very similar look and feel. The main difference is th

Artyom Kozhemiakin 7 Jan 10, 2023
Print out some fibonacci numbers.

give-me-some-fibonacci A Rust library for some fibonacci. TL;DR: its just a joke. Usage To get started using give_me_some_fibonacci, just add this to

Leonardo Vieira 2 Mar 22, 2022