Module conrod::guide::chapter_2[][src]

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 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. 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 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

We can test that everything is working 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
git clone
  1. Change to the conrod directory that we just cloned
cd conrod
  1. Test that conrod builds without problems
cargo build
  1. Build and run the examples (with --release optimisations turned on)!
cargo run --release --features "winit glium" --example all_winit_glium
cargo run --release --features "winit glium" --example canvas
cargo run --release --features "winit glium" --example primitives
cargo run --release --features "winit glium" --example text

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!