Cookin' with Rust
This Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
Read more about Rust Cookbook, including tips for how to read the book, how to use the examples, and notes on conventions.
Contributing
This project is intented to be easy for new Rust programmers to contribute to, and an easy to way get involved with the Rust community. It needs and welcomes help. For details see CONTRIBUTING.md.
Basics
Recipe | Crates | Categories |
Read lines of strings from a file | | |
Read and write integers in little-endian byte order | | |
Generate random floating point numbers | | |
Generate random values on a custom type | | |
Encoding
Recipe | Crates | Categories |
Serialize and deserialize unstructured JSON | | |
Deserialize a TOML configuration file | | |
Concurrency
Recipe | Crates | Categories |
Mutate the elements of an array in parallel | | |
Networking
Application development
Recipe | Crates | Categories |
Parse command line arguments | | |
Log a debug message to the console | | |
Log an error message to the console | | |
Enable log levels per module | | |
Log messages to a custom location | | |