Learn Rust with Tests
Learn Rust by writing tests, guided by the principles of TDD.
This book is inspired by Learn Go with Tests. The idea is simple: learn Rust incrementally, one small test at a time. Each chapter introduces a language concept or technique and uses Test-Driven Development to explore it.
You don't need to be an experienced programmer, but you should be comfortable with basic concepts: variables, functions, conditionals. Some experience with another language will help.
What you'll need
- A computer with an internet connection
- Rust installed
- A text editor or IDE
- A terminal
How this book works
Each chapter in the Rust Fundamentals section introduces a concept through the TDD cycle:
- Write a failing test
- Write the minimal code to make it pass
- Refactor
The Principles section describes the ideas behind this approach. You can read them first or return to them as reference as you work through the chapters.
Let's start with Hello, World.