Practical Rust Projects
Practical Rust Projects
Summary:
Introduction
The book "Practical Rust Projects" (author — Shing Lyu, 2021, 302 pages) is not another syntax textbook, but a full-fledged practical guide that immediately immerses the reader in creating real applications in the Rust language. Unlike many books where theory is detached from real life, here each project is a complete, working application that can be run and used. The author's goal is not just to teach how to write code, but to show how Rust is used in web development, systems programming, emulation, and even games.
What the book is about
The book consists of eight chapters, each dedicated to a separate project. It starts with a simple web server, then a REST API with a database, followed by a 2D game using ggez, a CHIP-8 processor emulator, a command-line utility, a web application with WebAssembly, and finally a project on working with network protocols. Each project is analyzed step by step: from problem statement to final refactoring. The author doesn't just provide ready-made code, but explains why a particular architecture was chosen, which crates (libraries) are best to use, and how to avoid common mistakes.
Who this book is for
The book is intended for those who are already familiar with the basics of Rust (variables, functions, ownership, borrowing, structs, enums) and want to move on to real projects. It is ideally suited for:
- Developers who know another language (Python, Java, C++) and want to quickly learn Rust through practice.
- Students studying systems programming.
- Hobbyist programmers who enjoy creating something interesting.
- Those who want to understand how Rust is used in web, games, and emulation.
What the reader will learn
After reading the book, you will be able to:
- Create a multithreaded web server from scratch using only the standard library.
- Develop a REST API with PostgreSQL connection and serialization via Serde.
- Write a 2D game (a Flappy Bird clone) using the ggez crate.
- Implement a CHIP-8 processor emulator, understanding machine cycles and memory.
- Create a command-line utility with arguments and colored output.
- Compile Rust code into WebAssembly and run it in the browser.
- Work with low-level network protocols (TCP, UDP).
Strengths
The main advantage of the book is its practical focus. Each project can be immediately run and modified. The author uses up-to-date versions of crates and Rust (as of 2021), which is rare for technical literature. The code is well-commented, and the explanations are clear and concise. The chapter on the CHIP-8 emulator deserves special mention: it's not just a toy, but an excellent way to understand how processors work at a low level. The book also teaches proper project structuring: modules, tests, documentation — all of this is present.
Who it is recommended for
The book will be useful for anyone who wants to move from theory to practice in Rust. It is not suitable for absolute beginners — it's better to first read "The Rust Programming Language" (the official guide). But if you have already written a few simple programs and want to see how Rust is applied to real-world tasks, this is the best choice. I especially recommend it to those interested in emulation, games, or web development in Rust.