Term: Spring 2019
Credits: 4 (410P), 3 (510)
Meeting Time: Tuesday, Thursday 1200-1350 (noon-1:30PM)
Meeting Location: TBA
Instructor: Bart Massey (bart AT cs DOT pdx DOT edu)
Office Location: FAB 120-18
Prerequisites: CS 201, CS 202
Everything about this syllabus is entirely tentative, and maybe be changed at the whim of the instructor without warning.
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 given good usability and tend to induce high-quality code.
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 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.
Programming Rust: Fast, Safe Systems Development
Jim Blandy and Jason Orendorff
The e-book of this text is less expensive and reads OK on a large screen.
Communications for this course will primarily be through a shared workspace provided by the Slack chat tool. Everyone is strongly encouraged to participate in the channel.
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.
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.
You will be assigned an individual course project, which will continue throughout the quarter. Regular project milestones will be expected throughout the course.
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.
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.