This repository collects beginner Rust programs, which showcase certain concepts that beginners might be unfamiliar with when learning Rust initially.
- Silvia O'Dwyer
- Michéal O'Dwyer
-
- whoever decides to join in and add more examples in the future! :D
I've been learning the basic syntax of Rust lately, and to help solidify my learning, I coded basic programs, and have categorised them accordingly.
I plan to keep adding to this as I keep coding and learning new concepts, so make sure to keep an eye on it.
If you ever intend to learn Rust, you might find the code useful if you're starting off initially and just want to look at sample code to do certain things.
Rust automatically creates an executable with every compilation of a program, but if you're not running Windows,
you'll need to compile the code from source. After downloading Rust, go to the directory with the program you want to compile
and type rustc name-of-program.rs
.
Of course, if the program requires external crates, then you'll need to use cargo to get those, so type cargo run --release
instead (the release tag makes sure the program runs with highest optimum performance).
Of course, feel free to add your own programs too, if you like! Just submit a pull request, and I'll add it in. :D Make sure they're beginner-friendly and not laboriously complex, for now, since this repo is dedicated to beginner programs.