Skip to content

A collection of beginner Rust examples, each focusing on a certain aspect of programming in Rust.

Notifications You must be signed in to change notification settings

silvia-odwyer/beginner-rust-examples

Repository files navigation

Rust Examples

PRs Welcome Powered by Rust

This repository collects beginner Rust programs, which showcase certain concepts that beginners might be unfamiliar with when learning Rust initially.

Contributors

  • Silvia O'Dwyer
  • Michéal O'Dwyer
    • whoever decides to join in and add more examples in the future! :D

Background

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.

How To Run The Programs

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).

Pull Requests Welcome!

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.

About

A collection of beginner Rust examples, each focusing on a certain aspect of programming in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages