This is a repository of the code practice bits in The Rust Programming Language, by Steve Klabnik and Carol Nichols, with contributions from the Rust Community. Each directory corresponds to a chapter or subchapter of the book, matching its URL when possible. Some examples spanning across several subchapters are merged into one directory, i.e. the extensive restaurant example of chapter 7.
Everything should compile without warning and binaries should run:
For code samples from the core text, functions and structs declarations are often inlined straight in the main() function body to follow the book reading flow. This might feel a little awkward, but the idea is to prevent mixing up concepts to much. Coding exercises are written using a more traditional fashion.
I intend to use this as future reference, but if that's useful for you then help yourself. The coding exercises "solutions" might help, but I offer no warranty whatsoever that they are the best ones . Feel free to make pull requests if you find errors, or have better solutions to suggest, and I'll be more than happy to have a look at them.