Work In Progress
This book is still going through heavy edits. Pardon the dust.
What you will find here
This book is a compendium of Rust ecosystem examples, recipes, and links. It is intended to be everything you need for day-to-day Rust coding, in one place.
It quickly summarizes the basics of the language and often-used elements of the standard library.
It then focuses on cross-cutting concerns that affect most aspects of development e.g. error handling, error customization, configuration, p-debugging...
Concurrency, including asynchronous programming, is covered in details.
Next are tools, such as Cargo, Clippy, Rustfmt, as well as links and examples specific to programming domains such as CLI and Web development. The links section provides pointers to notable Rust websites, books, and code examples.
Who should read this book?
This book is intended both for new Rust programmers (to get an overview of the capabilities of the Rust ecosystem and pointers to other resources) and for experienced programmers (to find code examples and review best practices for common programming tasks).
Readers should have already some basic familiarity with Rust
⮳ concepts. The Rust book
⮳ is an excellent resource for complete beginners to get started with.
Why this book?
Per the curated list of Rust crates blessed.rs⮳, "the standard library in Rust is much smaller than in Python or Go, for example. Those languages come with "batteries included" support ... Rust, on the other hand, gets things like that from the crates.io
ecosystem and the Cargo
package manager. But with almost more than 100 thousand crates to choose from, a common complaint from new Rust developers is that they don't know where to start, which crates they ought to use, and which crates they ought to trust." There are (not yet) dominant frameworks or platforms like Rails
, Django
, Spring
or Node
in the Rust world.
This book intends to provide EXAMPLES to demonstrate the use of key Rust crates, examples which are absent from or scattered in the reference docs⮳, and hopes to become a "cheat sheet on steroid" for the Rust ecosystem (not just for the Rust language).
What other books should I consult?
The Rust cookbook⮳ demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem. It focuses mainly on std
and a few core crates. The Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
Rust by Example⮳ is similar in concept - a collection of runnable examples - but not in scope, as it focuses solely on the Rust language and standard libraries.