Skip to content
  • Sign In
  • Try Now
View all events
Rust

Rust in 3 Weeks—with Interactivity

Published by O'Reilly Media, Inc.

Beginner content levelBeginner

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

This live event utilizes interactive environmentsThis live event utilizes interactive challenges

Rust is a systems programming language that eliminates entire classes of bugs and security vulnerabilities and has zero-cost abstractions like C and C++. Plus it’s fun to program in and lets systems programmers have nice things too. No wonder Rust is gaining traction in spaces as diverse as game engines, high-performance computing, embedded devices, and web programming.

Join expert Nathan Stocks to learn why Rust is so different from other programming languages and discover how it can benefit you. Through hands-on exercises, you'll explore what makes Rust such a compelling language—its safety, concurrency, speed, ownership model, and zero-cost abstractions, to name just a few things—and examine Rust’s packaging ecosystem, from libraries, binaries, modules, and dependencies to publishing and documenting. Along the way, you'll create, compile, and run a Rust project, navigate library documentation, and find answers to common questions.

Learn how to write high-performance code without the worry of crashes or security vulnerabilities, and join a vibrant community of developers where diversity, inclusion, and just plain being nice are all first-class objectives.

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

In Week 1, you’ll get a whirlwind tour of the most important Rust fundamentals, getting you past the steepest part of the learning curve, with lots of Q&A and hands-on exercises to put your newfound knowledge to the test.

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

Learn (and practice) how to use Rust as a good citizen. Week 2 covers unit and integration testing, documentation, publishing to crates.io, logging…and so much more.

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

In Week 3, you’ll learn how to use Rusty Engine (a simple Rust game engine) as you walk through an end-to-end game project. Then you’ll get the chance to build a game of your own, using premade assets and design instructions. Who knows, maybe this will be your big break!

NOTE: With today’s registration, you’ll be signed up for all three sessions. Although you can attend any of the sessions individually, we recommend participating in all three weeks and pursuing the challenges in between sessions.

Challenges

At the end of each week, Nathan will provide you with a challenge—an interactive scenario-based evaluation to help you determine whether you’ve mastered the skills taught in the live training and whether you’re ready to apply these skills in a real-world setting.

To reinforce your learning, we strongly recommend pursuing each challenge before the next week of the course. If you’re unable to successfully complete the challenge, try reviewing the video recording of the live training (emailed to you 24 hours after each session) for tips.

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 time frames 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.

    linkedinXlinksearch