Programming in Rust

CMSC388Z   •   Fall 2021   •   University of Maryland

Description

The Rust programming language eliminates serious classes of bugs compared to unsafe languages, such as C/C++, while retaining high performance. However, the Rust language can be challenging to learn. In this course, students will learn how to program effectively in Rust. The course includes a project, in which students will work in small groups on projects of their choice.

The contents of the website are subject to change.

Course Details

Textbooks

The Rust Programming Language
Rust Unofficial (Patterns)

Prerequisites

Minimum grade of C- in CMSC250 and CMSC216; and permission of CMNS-Computer Science department.

Lecture Time

Section 0101: Friday, 12:00pm - 12:50pm, CSI 3118
Section 0201: Friday, 1:00pm - 1:50pm, CSI 2107

Faculty Advisors

Michael Hicks, Michael Coblenz, Rob Patro

Course Facilitators

Dongze He
dhe17@umd.edu
Office hours: TBD (or by email)

Chase Kanipe
ckanipe@terpmail.umd.edu
Office hours: TBD (or by email)

Course Links

Github
Piazza
gradescope

Indoor Masking Mandate

According to the new indoor masking mandate, please wear a mask in class!

Schedule and Slides

Date Topic Assignment
Rust Basics
1 (09/03) Course introduction, cargo fundamentals, mutability, functions Assignment #1
2 (09/10) Ownership, references, borrowing, slices Assignment #1 due
Assignment #2
3 (09/17) Structs/impls, lifetimes -
4 (09/24) Rust build system. Modules, crates. Testing Assignment #2 due
Assignment #3
5 (10/01) Enums, pattern matching, Collections, Error handling -
6 (10/08) Traits, polymorphism Assignment #3 due
Assignment #4
7 (10/15) Heap allocation. Smart pointers -
8 (10/22) Project introduction. Interior mutability Assignment #4 due
Assignment #5
Intermediate Topics
9 (10/29) Interior mutability, Object-oriented programming in Rust -
10 (11/05) Closures, the builder pattern, writing iterators Assignment #5 due
Project proposal due
11 (11/12) Fearless concurrency, type markers and phantom types -
12 (11/19) Procedural and declarative macros Project milestone #1 due
13 (11/26) Thanksgiving -
Advanced Topics
14 (12/03) Student-directed topic -
15 (12/10) Office Hours (in sections with TAs) -

Syllabus

Overview

In this course, students will learn how to program effectively in Rust. The course includes five homework assignments that cover the basic topics listed in the schedule above. This course also includes a final project, in which students will work in small groups on projects of their choice to explore an application area according to their own interests.

Prerequisites

Minimum grade of C- in CMSC250 and CMSC216; and permission of CMNS-Computer Science department.

Grading

Percentages:

  • Programming assignments: 70%
  • Final Project: 30%
  • Extra credit for participating in the research study: TBD
Late submission policy:
  • Late submission within 24 hours = 10% penalty
  • Late submission over 24 hours = 90% penalty

Programming Projects

This course includes five homework assignment projects, and a final project. All projects must be submitted onto gradescope electronically following the instructions, and not by other means. It is your responsibility to test your program and verify that it works properly before submitting. All projects should be submitted prior to the time they are due. Late submission will be punished. Details can be found in grading policy section. Projects will primarily be graded automaticaly using test cases. Projects may also be manually evaluated by the course facilitator.

When submitting your projects, please upload a zip-compressed file which consists of your Rust project folder (do not include ./target and ./.git folder in your submission). Any "hard coding" in a project assignment may result in a score of zero for that project, and is considered a bad-faith effort. Hard coding refers to attempting to make a program appear as if it works correctly, when in fact it does not. Do not share or publicly post your project solutions on-line; doing so constitutes a violation of academic integrity. This issue is discussed in greater detail below.

Research Study

Programming in Rust can be challenging. In order to better understand how to make Rust easier to use, we would like to observe students while doing their work for the class. During the optional observation sessions, which will happen via Zoom, we will ask you questions about the work as you do it. Students can sign up for time slots that work for them, and will receive extra credit for doing so.

Miscellaneous

Syllabus subject to change.

Resources

All course content will be covered during class, but if you need additional readings, consult the following resources:

Course Textbooks

Books

Repositories

Videos

Policies

Academic Integrity

For learning the course concepts (including the programming languages), students are welcome to study together or to receive help from anyone else. You may discuss with others the project requirements, the features of the programming languages used, what was discussed in class and in the class web forum, and general syntax errors. Examples of questions that would be allowed are "Does a Java class definition end in a semicolon?" or "What does a 'class not found' error indicate?", because they convey no information about the contents of a project.

When it comes to actually writing a project assignment, other than help from the instructional staff a project must solely and entirely be your own work. Working with another student or individual, or using anyone else's work in any way except as noted in this paragraph, is a violation of the code of academic integrity and will be reported to the Honor Council. You may not discuss design of any part of a project with anyone except the instructor or teaching assistants. Examples of questions you may not ask others might be "How did you implement this part of the project?" or "Please look at my code and help me find my stupid syntax error!". You may not use any disallowed source of information in creating either their project design or code. When writing projects you are free to use ideas or short fragments of code from published textbooks or publicly available information, but the specific source must be cited in a comment in the relevant section of the program.

Violations of the Code of Academic Integrity may include, but are not limited to:

  • Failing to do all or any of the work on a project by yourself, other than assistance from the instructional staff.
  • Using any ideas or any part of another person's project, or copying any other individual's work in any way.
  • Giving any parts or ideas from your project, including test data, to another student.
  • Allowing any other students access to your program on any computer system.
  • request free, private accounts from Bitbucket.)
  • Transferring any part of a project to or from another student or individual by any means, electronic or otherwise.

If you have any question about a particular situation or source then consult with the instructors in advance. Should you have difficulty with a programming assignment you should see the instructional staff in office hours, and not solicit help from anyone else in violation of these rules.

It is the responsibility, under the honor policy, of anyone who suspects an incident of academic dishonesty has occurred to report it to their instructor, or directly to the Honor Council.

Students with Disabilities

Students with disabilities who have been certified by Disability Support Services as needing any type of special accommodations should see the instructor as soon as possible during the schedule adjustment period (the first two weeks of class). Please provide DSS's letter of accommodation to the instructor at that time.

COVID-19 policies

The masking policy of UMD -- announced August 6, 2021 -- requires everyone to wear a mask in public indoor spaces and on Shuttle-UM buses, regardless of vaccination status. For unvaccinated individuals, masks are also required while outdoors in crowded spaces. Additionally, every member of our campus community -- faculty, staff and students -- is expected to comply with the University System of Maryland vaccine mandate. Followed effectively, these two protocols can help ensure a vibrant and engaging fall semester. The latest policies can be found at here.

Other Accommodations and Policies

Additional course policies can be found here.