write code for part 03
[rust-101.git] / src / main.rs
1 // Welcome to Rust-101
2 // ===================
3 // 
4 // This is [Rust-101](https://www.ralfj.de/projects/rust-101/), a small *work-in-progress*
5 // tutorial for the [Rust language](http://www.rust-lang.org/).
6 // It is intended to be an interactive, hands-on course: I believe the only way to
7 // *really* learn a language is to write code in it, so you should be coding during
8 // the course. I am writing this tutorial with a tutorial situation in mind, i.e.,
9 // with a teacher being around to guide students through the course and answer
10 // questions as they come up. However, I think they may also be useful if you
11 // work through them on your own. Just make sure to actually play with the code.
12 // If you have any questions, maybe the "Additional Resources" below are useful.
13 // 
14 // I will assume basic familiarity with programming, and hence not explain the basic
15 // concepts common to most languages. Instead, I will focus on what makes Rust special.
16 // 
17 // Prerequisites
18 // -------------
19 // 
20 // You will need to have Rust installed, of course. It is available for download on
21 // [the Rust website](http://www.rust-lang.org/). At this point, I plan to restrict
22 // myself to stable Rust, so "Recommended" version is just right.
23 // You can find some more installation instructions in
24 // [the second chapter of The Book](https://doc.rust-lang.org/stable/book/installing-rust.html).
25 // When you are done, running `cargo build` in the root of Rust-101 should successfully compile
26 // all the code.
27 // 
28 // Getting the source
29 // ------------------
30 // 
31 // You are meant to play around with the source code of the course as you go on, so please
32 // fetch it from the [git repository](http://www.ralfj.de/git/rust-101.git) (also available
33 // [on GitHub](https://github.com/RalfJung/rust-101)).
34 // 
35 // Course Content
36 // --------------
37 // 
38 // The actual course is in the partXX.rs files. I suggest you get started with
39 // [the first part](part00.html), or jump directly to where you left off:
40 // 
41 // * [Part 00](part00.html)
42 // * [Part 01](part01.html)
43 // * [Part 02](part02.html)
44 // * [Part 03](part03.html) (WIP)
45 // * (to be continued)
46 #![allow(dead_code, unused_imports, unused_variables)]
47 mod part00;
48 mod part01;
49 mod part02;
50 mod part03;
51
52 // To actually run the code of some part (after filling in the blanks, if necessary), simply edit the `main`
53 // function.
54
55 fn main() {
56     part00::part_main();
57 }
58
59 // Additional material
60 // -------------------
61 // 
62 // There's tons of useful Rust stuff out there, so let me just put links to some
63 // of the most interesting places here:
64 // 
65 // * [The Rust Book](https://doc.rust-lang.org/stable/book/)
66 // * [Rust by Example](http://rustbyexample.com/)
67 // * The [Rust Subreddit](https://www.reddit.com/r/rust/)
68 // * For the IRC channel and other forums, see the "Community" section of the [Rust Documentation index](http://doc.rust-lang.org/index.html)