Rust Programming by Example
440 pages
English
PDF
4.5

Rust Programming by Example

Rust Programming by Example

Author:

Year:

Summary:

Introduction

The book «Rust Programming by Example» (authors — Guillaume Gomez and Antoni Boucher, 2018, 440 pages) is a practical guide to the Rust language, aimed at developers who prefer to learn by building real projects. Unlike academic textbooks, this book immerses the reader in writing code from the very first chapters: you don't just read theory, but immediately apply it in practice. Rust is a modern systems language known for its memory safety, high performance, and lack of a garbage collector. The book was published by Packt and is intended for readers who already have basic programming experience in other languages (C, C++, Python, or Java).

What the book is about

The book is built around 10–12 practical projects, each of which reveals a specific aspect of the language. You will start with simple console utilities, then move on to web servers, working with databases, multithreading, and even compiling to WebAssembly. The authors progressively introduce syntax, the ownership system, borrowing, lifetimes, traits, macros, and asynchronous programming. Each chapter contains clear objectives, step-by-step instructions, and the complete project code, which you can immediately run and modify.

Who this book is for

The book is intended for intermediate-level programmers who want to quickly learn Rust through practice. It will be useful for:

  • C/C++ developers looking to learn a safer alternative;
  • Python and Java programmers aiming for systems programming;
  • Students and enthusiasts interested in modern languages;
  • Those who want to build high-performance web applications, command-line tools, or embedded systems.

What the reader will learn

After reading the book, you will be able to:

  • Confidently write in Rust: understand ownership, borrowing, and lifetimes;
  • Create console utilities with argument handling and file I/O;
  • Develop multithreaded applications using channels and mutexes;
  • Work with external dependencies via the Cargo package manager;
  • Build simple HTTP servers and clients;
  • Use macros for metaprogramming;
  • Compile Rust code to WebAssembly for running in the browser;
  • Write tests and documentation directly in the code.

Strengths of the book

The main advantage of the book is its practical focus. Each chapter ends with a full-fledged project that can be added to a portfolio. The authors do not overload with theory, but explain concepts just enough for the reader to apply them in code. The example code is neat, well-commented, and follows modern Rust standards (at the time of the book's release — edition 2018). The chapter on WebAssembly deserves special mention — it was a rare topic for textbooks in 2018, making the book ahead of its time. The book also contains many tips on debugging and profiling, which is important for systems programming.

Who it is recommended for

The book «Rust Programming by Example» is recommended for anyone who wants to learn Rust by building real projects, rather than through dry theory. It is ideal for self-study: you can go through the chapters sequentially or choose projects that interest you. However, keep in mind that the book is not for absolute beginners in programming — knowledge of basic concepts (variables, functions, loops, data structures) is assumed. If you are already familiar with another language and want to quickly switch to Rust, this book is an excellent choice. On the PythonLib.ru website, we recommend it as one of the best practical introductions to Rust available on the Russian market (in the original English).

Recommendations