Syllabus

CS 410P/510 Rust: Rust Programming

Term: Spring 2019
Credits: 4 (410P), 3 (510)
CRN: 61319 (410P), 61341 (510)
Section: 43 (410P), 48 (510)
Meeting Time: Tuesday, Thursday 1200-1350 (noon-1:30PM)
Meeting Location: Fourth Ave Bldg (FAB) 46

Instructors:

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

  • TA: Jesse Zhu (jesszhu@pdx.edu)

  • Office hours 12-1:30 PM Friday @ 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 a shared workspace provided by a cross-platform chat tool. 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. Late homeworks will be accepted, if at all, only for good reasons and at a substantial penalty.

You may submit a homework as many times as you like, with the latest assignment received before grading being the only one considered for a grade. Please submit something before the deadline, even if it is only your name—you can then continue to work on your assignment as desired up until they are graded.

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

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.

Code Reviews Due: Friday, 5/31/19

Final Project Due: Friday, 6/7/19

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, 22 May 2019, 11:35 PM