cs137-22sp Rust Resources

Algorithms in the Real World (Spring 2022)

Rust is a systems programming language primarily targeting application areas where C and C++ have been used in the past.

The official website makes the case for Rust as follows:

Rust has been the most loved language in the StackOverflow survey since 2016.

Learning Rust for CS 137

Many projects have Rust as one of a few options for implementation language, so you may find yourself wanting to get up to speed with Rust quickly. Here are our favorite resources for learning Rust, in the order you might need to encounter them.

Our recommendation is to start with the Rust Book, then begin programming your project with internet searches and the standard library documentation as your guide. If you find yourself somewhat lost, try Rustlings or other resources.

It’s your choice how advanced you want to get with Rust in this class. Writing idiomatic Rust code will of course require more than just reading these resources, but idioms are best learned over time regardless.

Feel free to leverage course staff if you get stuck or want code quality advice.

Beginner

Intermediate

Rust Installation and Tooling

To install a rust toolchain, follow the instructions on the Rust website.

The easiest way to get a fantastic IDE experience for Rust is to use VSCode with the rust-analyzer extension available from the marketplace. Note this is not the first result when you search Rust; do not install the “official” extension. If you’re not using VSCode, see the rust-analyzer manual.

If you want help writing high-quality code, clippy is an excellent and easy-to-install linter.