Expand description
98-008: Intro to the Rust Programming Language
Poke Lab
The goal of this homework is to make sure that you understand Rust’s Structs and Enums, semantically known as Algebraic Data Types.
In this homework, you will be implementing two data types:
Charmander
and Eevee
.
This will be the first homework where you have to start writing code, so this may take a little longer than the last homework. If you are spending significantly more than 1 hour on this, please let us know!
For this homework, you should use the markdown-generated writeup. You can either get it from
our website, or generate it directly on your computer with cargo doc --open
.
Having this form of documentation allows you to follow hyperlinks
to get to documentation on specific types and methods.
Part 1: Charmander
Click this hyperlink to go to the writeup for Charmander
!
Part 2: Eevee
Click this hyperlink to go to the writeup for Eevee
!
Submission
We will try to create a handin.tar
automatically for you,
but you will need to have tar
already installed.
If you do not have tar
installed on your system,
install tar
on your machine or use the CMU Linux SSH machines.
If you need help with this, please reach out to us!
Once you have tar
installed, we will create the handin.tar
automatically for you
(take a peek into build.rs
if you’re interested in how this works!).
Once you have the handin.tar
, submit it to Gradescope.
Collaboration
In general, feel free to discuss homeworks with other students! As long as you do not copy someone else’s work, any communication is fair game.
Try to discuss on the course Discord or Piazza so that other students can see your questions and answers as well!
Remember that all formal questions should be asked on Piazza.
Feedback
We would like to reiterate that you should let us know if you spent anywhere in significant excess of an hour on this homework.
In addition, Rust has a notoriously steep learning curve, so if you find yourself not understanding the concepts, you should reach out to us and let us know as well — chances are, you’re not the only one!