Skip to content

Learning Rust in 6 weeks with ACM @ UCLA!

License

Notifications You must be signed in to change notification settings

uclaacm/uclaacm-rustlings

Repository files navigation

Learning Rust in 6 weeks

License: MIT License: CC BY 4.0 Creative Commons Attribution 4.0 International License logo

A collection of learning resources for Rust beginners, taught through the creation of a line-counting toy project!

Abstract

You will create a program to count lines of code (e.g., wc -l), eventually counting individual comments and empty lines, before finally parallelizing your program to count lines in multiple files at once. Counting lines may seem like a simple task, but it can involve a surprising amount of depth. This project will give you a tour of the main features of Rust.

There are a handful of other programs out there that accomplish what this toy does. Take a look at them to get a feel for what you’ll be making:

Table of Contents

  • Week 1: The Rust Toolchain
  • Week 2: A Simple CLI Line Counter
  • Week 3: Working with External Dependencies
  • Week 4: Parallelizing Line Counting
  • Week 5: Generics and Traits
  • Week 6: Integrating Rust and C/C++

Goals

You will learn:

  • Basics of Rust syntax
  • Rust’s toolchain
  • How to work with strings
  • How to interact with the filesystem
  • How to work with multiple threads to parallelize your code

You should already know:

  • Another programming language
  • How to navigate and use your computer with a terminal

Note that the point of this repository is to focus on learning by doing. Expect to play with the code, ask lots of questions, and carefully read linked resources!

Companion Repository

You should use the companion repository as a template and starting point for your code for the toy line counting project. It contains test cases to help validate the correctness of your code after each week.

Licensing and Attribution

Notes in this repository are published with the Creative Commons Attribution 4.0 International License.

Code samples in this repository are published with the MIT license.

If you use our material, please let us know! We'd love to hear how you used them, what worked, what didn't, and how we can improve upon them.

About

Learning Rust in 6 weeks with ACM @ UCLA!

Resources

License

Stars

Watchers

Forks