A training course about practical systems software construction in Rust.
Over a series of projects, you will build a single networked, multithreaded, and asynchronous Rust application. Creating this application, a key-value database, will provide opportunities to exercise the best of the crate ecosystem, a variety of concurrent data types, the world of async Rust, interesting language features, and important Rust tools. In between projects are small lessons and exercises on the subjects necessary to complete the next project.
Subjects covered include:
- Structuring and maintaining Rust programs
- Applying common tools like clippy and rustfmt
- Best practices in Rust error handling
- Serialization with serde
- Simple log-structured storage, inspired by bitcask
- Network programming with std and tokio
- Benchmarking with criterion
- Fun and foolproof parallel programming with crossbeam and more
- Asyncronous programming with Rust futures
- How to learn what you don't know about Rust and find the documentation and crates you need to succeed
After completing this course you will have the knowledge and experience to begin writing high performance, reliable, systems software in Rust. And you might discover that doing so is simpler than you expected.
Important note: Practical Networked Applications in Rust is in an alpha state. It contains bugs and its scope is limited. If you are taking it now you are brave, but you are also an early tester and your feedback is greatly appreciated. As you are following along please file issues. You are also encouraged to fix problems on your own and submit pull requests. See CONTRIBUTING.md for details.
The goal of this course is to teach new Rust programmers how build real-world systems programs, with all the desirable Rust characteristics, including high-performance, reliability, and easy concurrency; and to do so using the best practices that might not be evident to newcomers.
Non-goals of this course include teaching installation, syntax, and other Rust basics; teaching basic data structures and algorithms; teaching basic parallel and asynchronous programming concepts; and being a comprehensive resource on the Rust language. That information is easily found in The Rust Book and elsewhere.
Practical Networked Applications in Rust is for novice Rust programmers, but it is not for novice programmers.
The primary audience of this course is recent graduates and near-graduates of an undergraduate computer science program who are considering starting a career as a Rust systems programmer. Others will also likely benefit, including experienced developers without systems programming experience.
Those taking this course should:
- have the equivalent of an undergraduate computer science education,
- have intermediate-level experience in some programming language,
- be comfortable working in the terminal and command line,
- know how to use git,
- have novice-level experience with parallel programming in some language,
- have novice-level experience with asynchronous programming in some language,
- have novice-level experience writing code to query a database, SQL, NoSQL, NewSQL, key-value, or otherwise.
- have read The Rust Book in its entirety,
- have written some Rust code, including the projects from the book:
To reiterate — read The Rust Book before taking this course. It is not necessary to have more than novice-level knowledge or experience with Rust, but this course does not teach Rust basics.
If you can check all the above boxes then you are ready for this course. If not, we have some suggestions for how to learn the prerequisites.
Get started now - view the lesson plan.
This course is part of a series of courses initiated by PingCAP to train students, contributors, new hires, and existing employees in Rust for distributed systems. Those who complete this one may wish to continue to Distributed Systems in Rust.
This course, combined with Deep Dive TiKV, and the Distributed Systems in Rust course is intended to be enough to enable programmers to meaningfully contribute to TiKV. It is most specifically designed to teach those in the Chinese Rust community enough Rust to work on TiKV. The language used is intended to be simple so that those who read only a little English can follow. If you find any of the language difficult to understand please file issues.
See CONTRIBUTING.md.