1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
/*!
**Getting Started**
In this chapter we'll make sure that your environment is setup correctly for using Conrod.
## Installing Rust and Cargo
Conrod is a Rust library (aka crate), so you'll need Rust! Conrod tracks the stable branch, so you
can be assured that we'll always be compatible with the latest stable version of rustc.
We also rely on the Rust package manager [Cargo](https://crates.io/) for managing dependencies
and hosting the latest version of conrod.
The easiest way to acquire both of these is by downloading the Rust installer from [the Rust
homepage][rust-lang]. This installer will install the latest stable version of both rustc and
cargo.
Once installed, you can test that rustc and cargo are working by entering `rustc --version` and
`cargo --version` into your command line.
If you're brand new to Rust, we recommend first checking out [The Official Rust Book], or at least
keeping it on hand as a reference. It also contains a [Getting Started][rust getting started] guide
with more details on installing Rust, which may be useful in the case that you run into any issues
with the above steps.
## Running the Conrod Examples
You can view the examples by cloning the github repository and running the examples.
First, open up the command line on your system and follow these steps:
1. Clone the repo
```txt
git clone https://github.com/PistonDevelopers/conrod.git
```
2. Change to the `conrod` directory that we just cloned
```txt
cd conrod
```
3. Build and run an example (with --release optimisations turned on)!
```txt
cargo run --release --example all_winit_glium
cargo run --release --example canvas
cargo run --release --example primitives
cargo run --release --example text
```
Hint: You can get a list of all available examples by running:
```txt
cargo run --example
```
If you ran into any issues with these steps, please let us know by filing an issue at the Conrod
[issue tracker]. Be sure to search for your issue first, as another user may have already
encountered your problem.
Otherwise, you're now ready to use conrod!
[rust-lang]: https://www.rust-lang.org/ "The Rust Homepage"
[The Official Rust Book]: https://doc.rust-lang.org/book/ "The Official Rust Book"
[rust getting started]: https://doc.rust-lang.org/book/getting-started.html "Getting Started with Rust"
[issue tracker]: https://github.com/PistonDevelopers/conrod/issues "Conrod issue tracker"
*/