Skip to content
O'Reilly home
Rust

Rust in 3 Weeks

Published by O'Reilly Media, Inc.

Interactive powered by Katakoda With Skills Challenge

Learn enough Rust to get past the hardest part of the learning curve

November 1, 2021

4:00 p.m. - 8:00 p.m. Coordinated Universal Time

November 8, 2021

5:00 p.m. - 9:00 p.m. Coordinated Universal Time

November 15, 2021

5:00 p.m. - 9:00 p.m. Coordinated Universal Time

162 spots available

Sign up for a free trial!

or sign in.

Registration closes October 31, 2021 10:00 p.m. Coordinated Universal Time

What you’ll learn and how you can apply it

By the end of this live online course, you’ll understand:

Week 1: Crash Course Fundamentals—From Introductory Concepts to Essential Tools

  • What makes Rust such a compelling language
  • Rust’s packaging ecosystem
  • Introductory Rust concepts, such as variables, control flow, lifetimes, functions, primitive and compound types, and compiling your own code
  • Essential tools such as structs, traits, enums, strings, and collections

Week 2: Practical Rust—Best Practices, Tour of the Library, and Commonly Used Traits

  • Rust best practices like unit and integration testing, documenting your code and producing a website for your documentation, profiling, publishing your code to crates.io, and creating and handling your own errors
  • Commonly used items from the standard library, such as multithreading, closures, channels, I/O, and iterators
  • Commonly used traits from the standard library and how to implement them, including Debug, Display, Default, From/Into, and more

Week 3: Game Day—Use Your Rust Knowledge in Practice by Building an End-to-End Project

  • How to put your knowledge into practice in the context of actual working game projects
  • How to use Rusty Engine, a simple game engine, to create small, functional games

And you’ll be able to:

Week 1: Crash Course Fundamentals—From Introductory Concepts to Essential Tools

  • Create, compile, and run a Rust project
  • Understand the language and navigate library documentation
  • Get help and find answers to common questions
  • Find and integrate other Rust projects into your own
  • Identify the benefits of Rust by creating Rust versions of your own projects and comparing the development experience and resulting performance

Week 2: Practical Rust—Best Practices, Tour of the Library, and Commonly Used Traits

  • Test your own code
  • Document your code and generate an interactive documentation website
  • Use the standard library to process files, spawn threads, and communicate via channels
  • Implement standard library traits for your own custom structs

Week 3: Game Day—Use Your Rust Knowledge in Practice by Building an End-to-End Project

  • Create a stand-alone library project and publish it for others
  • Create an end-to-end application and run it
  • Combine standard library and third-party libraries to produce interesting things

This live event is for you because…

  • You're a C or C++ programmer who wants power and zero-cost abstractions without security vulnerabilities, undefined behavior, crashes, and other rough edges.
  • You need more performance out of your language than Python or Ruby can provide.
  • You want to be a systems programmer.
  • You need to deal directly with hardware—for example, you need your code to run on a microcontroller, or you want to write a device driver.
  • You're already experienced in other languages, and you want to get up and running with Rust in record time.
  • You’re interested in moving toward WebAssembly and want to learn how Rust can get you there.

Prerequisites

  • A computer (macOS, Linux, or Windows, 8+ GB of RAM) with the latest stable version of Rust installed and the IDE (or editor) of your choice configured to work with Rust (instructions)
  • A basic understanding of general programming concepts (variables, types, loops, and functions) and computer hardware and architecture terminology (stack, heap, bits, bytes, etc.)
  • A working knowledge of at least one programming language

Recommended preparation:

  • Choose one place to “find answers" about Rust and either introduce yourself (if it's a forum, IRC, etc.) or find the answer to one question you have
  • Try doing something in Rust, such as “cargo new message,” “cd message,” and “cargo run,” then edit src/main.rs to change the message and “cargo run” again to see your new message

Recommended follow-up:

Schedule

The timeframes are only estimates and may vary according to how the class is progressing.

Week 1: Crash Course Fundamentals—From Introductory Concepts to Essential Tools

Overview (10 minutes)

  • Presentation: Where did Rust come from?; What makes Rust so different, and why would you want to use it?; ownership—the key to a different mindset
  • Group discussion: What kind of language are you most experienced with?

Getting started (20 minutes)

  • Presentation: Cargo; variables
  • Hands-on exercises: Create and run your own project; use Cargo to create a binary project; alter and run the project to observe the effects
  • Q&A

Functions (40 minutes)

  • Presentation: Scope; memory safety; functions
  • Hands-on exercises: Add functions to the example project; run the project to ensure your functions work correctly
  • Q&A
  • Break

Simple types (30 minutes)

  • Presentation: Scalar types; compound types
  • Hands-on exercise: Write code to transform data from an example project through several stages
  • Q&A

Interaction (40 minutes)

  • Presentation: Control flow; strings
  • Hands-on exercise: Write code to alter the behavior of the example project with various command-line options
  • Q&A
  • Break

Data (30 minutes)

  • Presentation: Ownership; references; borrowing
  • Hands-on exercises: Using the example project, add functions that inspect or modify data without taking ownership of the data; use references to borrow the data and call into the above functions
  • Q&A

Power tools: Part 1 (40 minutes)

  • Presentation: Structs; traits
  • Hands-on exercises: Create your own trait that can accomplish the supplied task; create two different structs; implement your trait for both of your structs; write a function that can take any struct implementing your trait
  • Q&A
  • Break

Power tools: Part 2 (30 minutes)

  • Presentation: Collections; enums
  • Hands-on exercises: Create an enum that represents different reporting categories; write a data-processing pipeline that accepts the incoming data and uses your enum to store statistics in an appropriate collection; output your statistics at the end
  • Q&A

Week 1 Challenges

Week 2: Practical Rust—Best Practices, Tour of the Library, and Commonly Used Traits

Idiomatic Rust (10 minutes)

  • Presentation: Clippy and Rustfmt
  • Hands-on exercise: Run Clippy and Rustfmt
  • Q&A

Testing (25 minutes)

  • Presentation: Unit testing; integration testing; profiling
  • Hands-on exercises: Write a unit test and an integration test; profile them
  • Q&A

Documentation (35 minutes)

  • Presentation: Documenting modules, functions, structs, and enums; generating a website; doc tests
  • Hands-on exercises: Document a function including example code; generate a website; run the doc tests
  • Q&A
  • Break

Publishing to crates.io (10 minutes)

  • Presentation: How to publish your code
  • Hands-on exercise: TBD
  • Q&A

Logging and error handling (50 minutes)

  • Presentation: Logging; error handling
  • Hands-on exercise: TBD
  • Q&A
  • Break

Standard library: Part 1—Closures and iterators (15 minutes)

  • Presentation: Closures; iterators
  • Hands-on exercise: TBD
  • Q&A

Standard library: Part 2—Multithreading and channels (25 minutes)

  • Presentation: Multithreading; channels
  • Hands-on exercise: TBD
  • Q&A
  • Break

Standard library: Part 3—File I/O (25 minutes)

  • Presentation: File I/O
  • Hands-on exercise: TBD
  • Q&A
  • Break

Commonly used traits: Debug, Display, Default, and From/Into (35 minutes)

  • Presentation and demos: How to implement a standard library trait for your own struct; using From and Debug
  • Hands-on exercise: Implement Default
  • Wrap-up and Q&A (10 minutes)

Week 2 Challenges

Week 3: Game Day—Use Your Rust Knowledge in Practice by Building an End-to-End Project

Quick review of fundamentals (15 minutes)

  • Presentation: What you’re using and why
  • Q&A

End-to-end demonstration (50 minutes)

  • Presentation: Intro to software; scenarios for game-day project
  • Break

Game-day project (100 minutes)

  • Hands-on exercise: Complete game-day project (options for both beginners and advanced learners)
  • Break

Wrap-up and Q&A (15 minutes)

Your Instructor

  • Nathan Stocks

    Nathan Stocks is a Senior Software Engineer at GitHub by day and a hopelessly naive indie game developer by night. He has been working with scalable infrastructure and services for over 20 years. He likes growing maple trees from seed, playing frisbee, spending time with his wife and kids, and eating food.

Start your free 10-day trial

Get started

Want to learn more at events like these?

Get full access to O'Reilly online learning for 10 days—free.

  • checkmark50k+ videos, live online training, learning paths, books, and more.
  • checkmarkBuild playlists of content to share with friends and colleagues.
  • checkmarkLearn anywhere with our iOS and Android apps.
Start Free TrialNo credit card required.