CS 410P/510 Rust: Rust Programming

Term: Winter 2020
Credits: 4 (410P), 3 (510)
CRN: 45294 (410P), 45295 (510)
Section: 64 (410P), 66 (510)
Meeting Time: Monday, Wednesday 1640-1830 (4:40-6:30PM)
Meeting Location: Fifth Ave Cinema Room 90

Instructors:

  • Bart Massey (bart@cs.pdx.edu)
    Office Location: FAB 120-18

  • TA: Jordan Dearborn-Childs (jsd9@pdx.edu)
    Office Hours Monday 11AM-1PM @ Fishbowl

Prerequisites: CS 201, CS 202

Disclaimer

Everything about this syllabus is entirely tentative, and may be changed at the whim of the instructor without warning.

Description

In this course, we will learn to program in Rust. Rust is a novel programming language combining solid bare-metal performance with modern language features that give acceptable usability and encourage high-quality code.

Goals, Topics and Objectives

The languages of choice for systems programming for the past 30 years have been C and its larger cousin C++. Because of their popularity and performance, C and C++ have also been a common choice for application programming. However, these languages are well-understood to be both error-prone, inconveniently verbose and repetitive, and difficult to use for large-scale software engineering.

Rust is an attempt to remedy many of the deficiencies of C and C++. Rust provides a modern strong static type system, a strong module system supporting separate module compilation, and a static programmer-transparent memory allocation scheme that largely eliminates runtime memory errors.

In this course, we will learn to program in Rust. Familiarity with programming in general and C/C++ in particular is required. Basic ability to use the Linux environment is required.

Upon the successful completion of this course students will be able to:

  • Create a Rust project, including proper Cargo configuration.

  • Translate a design into a working Rust program.

  • Explain and remedy type and lifetime errors encountered during Rust programming.

  • Construct reasonable types within programs, including parametric and lifetime-bounded types.

  • Use structs, enums and traits as intended in the construction of Rust programs.

  • Apply references, boxes, cells and reference counting in Rust programming.

  • Divide a Rust crate into multiple source files using the module system.

  • Write tests and documentation using the Rust infrastructure.

  • Write a Rust package ("crate") that integrates smoothly into the Rust ecosystem.

Course Text

Programming Rust: Fast, Safe Systems Development
Jim Blandy and Jason Orendorff
O'Reilly 2018

The e-book of this text is less expensive and reads OK on a large screen.

Course Communication

Communications for this course will primarily be through Slack: http://pdx-cs.slack.com #cs510rust-w2020 . Everyone is strongly encouraged to participate in the channel.

Course Work

Workload

This course requires substantial out-of-class homework and study. Expect to spend at least 8 hours of out-of-class time each week mastering this difficult material.

I encourage group collaboration on individual assignments: creating study groups or online chat-rooms to discuss the approach and understand the problem is an acceptable and encouraged methodology. The write-up, programming, and actual solutions must be your individual work. If you represent someone else's work as your own, you are committing plagiarism.

Homework

I will assign take-home homework many weeks.

You may submit a homework as many times as you like, with the latest assignment received before submission closes being the only one considered for a grade. Please submit something before the assignment due date, even if it is only your name, so that you do not fail the course (see below). Submission may close at the assignment due date: assignments first received after submission closes will receive a grade of zero and result in course failure.

Assignments will be graded for having been turned in and having made a reasonable effort, as well as for a reasonable degree of correctness.

It is important to keep up with this course. A grade of zero on any assignment will result in a course grade of F, unless excused by me for exceptional circumstances.

Course Project

You will be assigned an individual course project, which will continue throughout the latter part of the quarter. Regular project milestones will be assigned.

Academic Honesty

Cheating on homework or the project will result in a grade of zero on the affected material, and will be reported to appropriate authorities. Plagiarism is a form of cheating. Please do not let me catch you plagiarizing.

Plagiarism: n 1: a piece of writing/work that has been copied from someone else and is presented as being your own work 2: the act of plagiarizing; taking someone's words or ideas as if they were your own.
—www.dictionary.com

If you use code, ideas, or text authored by someone else, cite them. It is OK to get help from external sources of knowledge, but citation is mandatory.

Last modified: Wednesday, 15 January 2020, 1:36 AM