EECS 3/496:

Systems Programming in Rust

Syllabus – Spring 2019

Tech M128, TuTh, 12:30–1:50 PM

Course staff & office hours

Instructor Jesse Tov jesse@eecs Mudd 3510 Tu/Th 3:30–4:30 PM
TA Jonathan Chan jonathanchan@u Wilkinson Lab W 5–7 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.

Exams

We will have one in-class examination on Thursday, May 9.

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 Piazza discussion board.

Software

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

    curl https://sh.rustup.rs -sSf | sh

Rust is also available on the lab machines (tlab01.eecs, batman.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.

April
TuTh
2 Introduction [UB examples; rainfall spec] 4 A first Rust program [code]
9 Rainfall in Rust [code] 11 More Rust basics [code] Homework 1
16 Ownership and borrowing [slides, code] 18 Linked data structures Homework 2
23 Concurrency in Rust [code] 25 More concurrency Homework 3
30 Iterators in Rust [code]
May
TuTh
2 More iterators Homework 4
7 Exam review 9 Exam
14 Futures and async [code] Project proposal 16 Futures and async, continued
21 Client-side web programming Progress check 1 23 Client-side web programming, continued
28 Slack Progress check 2 30 Final presentations
June
TuTh
4 Final presentations Project code 6 Final presentations

Course policies

Collaboration and academic integrity

You may not collaborate with anyone on the exam. You may not use any electronic tools, including phones, tablets, netbooks, laptops, desktop computers, etc. If in doubt, ask the instructor.

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 yours, or when appropriate, your team’s. The best place to discuss anything related to the course is on our Piazza 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.

Students who cheat will be reported to the appropriate dean.

If you are unclear on any of these policies, please ask the instructor.

Homework

In general, you should submit your homework according to the instructions on the web page 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

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.