EECS 3/496:

Systems Programming in Rust

Syllabus – Winter 2020

Annenberg Hall G01, TuTh, 11:00–12:20 PM

Instructor office hours

Jesse Tov jesse@eecs Mudd 3510 Tu/Th 3:30–4:30 PM

General information

Abstract

Modern, safe programming languages such as Java and Python have become increasingly accepted for application-level programming, but for systems programming, which often requires precise, low-level control of system resources, programmers still turn to C and C++. The new programming language Rust, under development by Mozilla, promises the best of both worlds: the type safety of Java with the speed and expressiveness of C++. Through discussions, lectures, and programming exercises, students will learn how to program in Rust and to use its resource ownership model effectively. Rust is especially well suited for our particular focus, systems programming, so students will use Rust as a vehicle for exploring both classic systems programming problems and more contemporary concerns.

Prerequisites

This course assumes proficiency in C++ and some programming maturity. In particular, we assume you are comfortable with:

Topics

Assessment

We will have two 80-minute, in-class exams:

There will be no final exam.

Resources

Information

There is no required textbook. However, you are likely to find some online references useful:

Please post your questions on our Campuswire discussion board.

Software

We will use Rust 1.40.0, the current stable release. On macOS or Linux, it’s recommended that you install Rust using rustup, with this single command:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Rust is also available on the lab machines (finagle.wot.eecs, batgirl.eecs, etc.). Add /home/jesse/pub/rust/cargo/bin to your PATH.

We also will use C++ 2017, the current version of the C++ programming language; earlier versions of C++ may not work for all the code we write. The instructor will be using CLion, a cross-platform IDE. CLion ordinarily costs money, but student licenses are available for free. Any other conforming C++17 toolchain should work.

For editing Rust, CLion has a good plugin that your instructor uses. Alternatively, many Rust programmers like Microsoft VS Code, which allegedly has good Rust support via the Rust Language Server. Theoretically the RLS can provide Rust support to any Language Server–enabled editor, including Vim and Emacs, though it’s still in active development and your mileage may vary.

Class schedule

This table specifies the course schedule; topics are tentative.

January
TuTh
7 Introduction [UB examples; rainfall spec] 9 Rainfall in Rust
14 TBD Homework 1 16 TBD
21 TBD Homework 2 23 Ownership & Borrowing [slides code]
28 TBD Homework 3 [advice] 30 First exam
February
TuTh
4 TBD Homework 4 6 TBD
11 TBD Project proposal 13 TBD
18 TBD Progress check 1 20 TBD
25 TBD Progress check 2 27 Second exam
March
TuTh
3 TBD Progress check 3 5 TBD
10 Final project presentations Project code 12 Final project presentations

Course policies

Collaboration and academic integrity

You may not collaborate with anyone on any of the exams. You may not use any electronic tools, including phones, tablets, netbooks, laptops, desktop computers, etc. If in doubt, ask a member of the course staff.

Most homework assignments will be completed with a partner or team. You should work with your official partner or team, as specified, on homework assignments. You may discuss your work with anyone, but you may not look at others’ code, and all work you submit must your own, or when appropriate, your team’s. The best place to discuss anything related to the course is on our Campuswire discussion board. Of course, you may always ask the instructor for help; when working with a partner, it’s best to ask for help together.

Providing illicit help to another student is also cheating, and are subject to the same penalties as those who receive illicit help. It is your responsibility to safeguard your own work.

Students who cheat will be reported to the appropriate dean.

If you are unclear on any of these policies, please ask a member of the course staff.

Homework

In general, you should submit your homework according to the instructions on the web pages for the individual assignments.

Late work

Acceptance of late work is at the discretion of the instructor. Generally, I would rather have you do the work and learn something rather than skip it.

Grades

Tentative: Your grade will be based on your performance on

The mapping of raw point totals to letter grades is at the discretion of the instructor.