SC‐Homework‐09 - TheEvergreenStateCollege/upper-division-cs-23-24 GitHub Wiki
(Total 89 points)
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-09
You will submit a link to this wiki page to the Canvas assignment.
This homework is complete when you complete the following parts and document them in your dev diary entry, which should include code snippets and screenshots similar to those shown below, taken from the computer that you work on and your own code.
10 points per chapter.
Read and do the exercises in The Rust Interaction Book for these two chapters:
Take screenshots of your quiz answers and write a short discussion explaining your answers, adding them to your dev diary entry for this homework.
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
20_threads
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.
Take screenshots of your code, even if it doesn't pass tests, as long as you can write a short discussion explaining your challenge, what you think may be happening when you run your code, or what the compiler errors may mean. Add these to your dev diary entry for this homework.
60 pts = 35 pts from Section 4.8 + 25 pts from Section 4.9
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.8 and 4.9.

In your local copy of the class monorepo upper-division-cs
, use you personal assignments directory
that you created in previous assignments.
cd <repo_dir>/sc-24sp/assignments/<your_github_usernames>/wasm-game-of-life
At the end of each work session, and for your homework submission, commit and push using our Git Workflow.
-
15 points for committing code that solves equivalent problems to Section 4.8 (profiling)
- link to your pull request in your dev diary
-
5 points for adding a screenshot to your dev diary measuring your animation "framerate" before and after improving your drawing code, similar to the following
- 5 points for adding a screenshot to your dev diary showing the output of
cargo bench
before and after optimizing yourUniverse.tick
method


- 10 points for committing code that solves the first two exercises at end of Section 4.8 (profiling)
- and linking to your pull request in your dev diary

- As a stretch goal if you finish early, try the last exercise implementing a WebGL renderer.
-
10 points for committing code from Section 4.9 (shrinking wasm size)
- and linking to your pull request in your dev diary
-
10 points for committing code that solves the first two exercises at end of Section 4.9 (shrinking wasm size)
- and linking to your pull request in your dev diary

- 5 points for adding a screenshot to your dev diary of before and after optimizing your WASM size similar to the below
- but taken from your development machine and reflecting code you have run


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