Making Open Work
May 8–9, 2017: Training & Tutorials
May 10–11, 2017: Conference
Austin, TX

Networked gaming in Rust

Jim Blandy (Mozilla Corporation)
9:00am12:30pm Tuesday, May 9, 2017
Location: Meeting Room 19
Level: Advanced
Average rating: **...
(2.00, 1 rating)

Who is this presentation for?

  • Programmers interested in Rust, games, networking, and graphics

Prerequisite knowledge

  • A working knowledge of Rust—familiarity with ownership, borrowing, generics, traits, etc. (When you hear the words "borrow checker," you should have an unconscious urge to improve your posture. You should have some experience using the standard library and be ready to look up bits and pieces you don't know.)
  • A general understanding of a coordinate transformation matrix (Check out 3blue1brown's excellent short video series, The Essence of Linear Algebra.)

Materials or downloads needed in advance

  • A laptop (Windows, macOS, or Linux with a working OpenGL driver and network card) with rustup installed and up to date with the most recent stable and nightly toolchains
  • Please clone this program and try running it on your computer in advance

What you'll learn

  • Strenthen your Rust skills
  • Learn to use the Tokio asynchronous I/O framework to write some networking code, Rust's concurrency facilities to implement game logic, and the glium OpenGL API to write some graphics code


Rust is a new systems programming language from Mozilla that combines native performance, concurrency, and safety. Rust’s unusual type system prevents common memory errors and in doing so also eliminates broad classes of security holes and enables data-race-free multithreaded programming. What’s more, Rust accomplishes all this without resorting to garbage collection. A performant, concurrency-friendly, secure language that never pauses for garbage collection is ideal for writing networked games.

Modern games push hardware to its limits—putting every core to use, maxing out the graphics processor, and saturating the network. We can’t do that in a three-hour tutorial (or not deliberately, at least, without melting OSCON’s WiFi), but we can still have some fun. Jim Blandy shows you how to implement a networked game in Rust, using the excellent glium crate for type-safe OpenGL bindings and the new Tokio framework for efficient, composable asynchronous I/O. Jim shares a number of presentations, each followed by a short coding exercise, checked by supplied unit tests. Jim will also provide solutions, so even if you don’t get something right away, you won’t be left behind.

Photo of Jim Blandy

Jim Blandy

Mozilla Corporation

Jim Blandy is a free software hacker. Jim has worked on Guile, GDB, Subversion, and Firefox for the Free Software Foundation, Red Hat, and the Mozilla corporation.