SC‐Homework‐08 - TheEvergreenStateCollege/upper-division-cs-23-24 GitHub Wiki
(Total 106 points)
10 points per chapter.
Read and do the exercises in The Rust Interaction Book for these two chapters:
- An I/O Project: Building a Command Line Program
- Functional Language Features: Iterators and Closures
3 points per exercise.
In your GitPod workspace, change into the sc-24sp/rustlings
directory and run the command
rustlings watch
You can open another terminal and change to the same sc-24sp/rustlings
directory to run the command
rustlings hint <exercise_file_name>
as needed.
As shown in the screenshot below, complete the 7 Rustlings exercises by typing into the files
16_lifetimes
17_tests
18_iterators
In GitPod, your files are autosaved as you type, and the rustlings watch
terminal will automatically recompile
and let you know whether your current exercise file is complete, or the compile error in the next file if you remove the
comment line // I AM NOT DONE
Do not add or commit your rustlings
work. The rustlings
directory is gitignore
'd.
Our main project for the remainder of the quarter will be implementing Conway's Game of Life, a cellular automata simulation and pixel art experience.
For this homework, read through the Rustwasm Book's tutorial including up to Sections 4.5, 4.6, 4.7 as shown in the screenshot below.

In your local copy of the class monorepo upper-division-cs
, use you personal assignments directory
that you created in the previous assignment.
cd <repo_dir>/sc-24sp/assignments/<your_github_usernames>/wasm-game-of-life
The following manual configuration steps are needed to do this lab in this GitPod environment, following the steps in wshine's dev diary.
You may need it on your local laptop as well. Note that the Rustwasm software relies on a very old version of Node (Node v14) which in turn relies on an older version of Python (3.10). You may choose to use GitPod for this lab for this reason.
- Source and install Node Version Manager as the
gitpod
user (it's important not to run this as root, as it's designed to be a single-user installation and not system-wide)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- Install Node v14
. ${HOME}/.nvm/nvm.sh; nvm install v14
- Install
cargo-generate
as in the Rustwasm book
cargo install cargo-generate
Follow the instructions in the Rustwasm Book's setup, including running cargo generate
.
This part of the homework is complete when you complete the following five parts, including dev diary entries, which should include code snippets and screenshots similar to those shown below.
At the end of each work session, and for your homework submission, commit and push using our Git Workflow.
Create a dev diary here if you don't have one first, and link to a page or section called ## <today's date> <yourusername>-SC-HW-08
- 10 points for committing code that solves equivalent problems to Section 4.5 (testing)
- 10 points for committing code that solves equivalent problems to that in Section 4.6 (debugging)
- 10 points for adding a screenshot to your dev diary similar to the below
- 10 points for committing code that solves equivalent problems to that in Section 4.7 (interactivity)
- 10 points for doing exercises in Secton 4.7 and describing in a dev diary entry.

Document any challenges or successes you experience as you complete the Rustwasm Game of Life above.