This is a collection of toy code examples written while reading The Rust Programming Language, a book that teaches the basics and advanced features of Rust. High recommendation for this book.
Actually I make this repository public here just to record my learning progress.
All codes passed test on rustc 1.76.0 (07dca489a 2024-02-04).
You can clone this repository to your local machine and run the examples using the cargo
command. For example, to run the hello_cargo
example, you can do:
git clone https://github.com/255doesnotexist/rust-lang-learning-examples.git
cd rust-lang-learning-examples/hello_cargo
cargo run
The hello_world directory need to compile with rustc because it's created before the book introduce the cargo tool.