2017-04-17 02:48:59 +00:00
|
|
|
# Quickstart
|
|
|
|
|
2017-07-03 05:51:24 +00:00
|
|
|
Before you can start writing a Rocket application, you'll need a **nightly**
|
|
|
|
version of Rust installed. We recommend you use [rustup](https://rustup.rs/) to
|
2017-07-10 11:59:55 +00:00
|
|
|
install or configure such a version. If you don't have Rust installed and would
|
2018-10-16 05:50:35 +00:00
|
|
|
like extra guidance doing so, see the [getting started](../getting-started)
|
2017-07-10 11:59:55 +00:00
|
|
|
section.
|
2017-04-17 02:48:59 +00:00
|
|
|
|
|
|
|
## Running Examples
|
|
|
|
|
|
|
|
The absolute fastest way to start experimenting with Rocket is to clone the
|
|
|
|
Rocket repository and run the included examples in the `examples/` directory.
|
|
|
|
For instance, the following set of commands runs the `hello_world` example:
|
|
|
|
|
|
|
|
```sh
|
2017-07-01 01:36:59 +00:00
|
|
|
git clone https://github.com/SergioBenitez/Rocket
|
|
|
|
cd Rocket
|
2020-11-10 06:59:32 +00:00
|
|
|
git checkout v0.4.6
|
2017-07-01 01:36:59 +00:00
|
|
|
cd examples/hello_world
|
2017-04-17 02:48:59 +00:00
|
|
|
cargo run
|
|
|
|
```
|
|
|
|
|
2017-07-01 01:36:59 +00:00
|
|
|
There are numerous examples in the `examples/` directory. They can all be run
|
|
|
|
with `cargo run`.
|
2018-10-22 21:47:35 +00:00
|
|
|
|
|
|
|
! note
|
|
|
|
|
|
|
|
The examples' `Cargo.toml` files will point to the locally cloned `rocket`
|
|
|
|
libraries. When copying the examples for your own use, you should modify the
|
|
|
|
`Cargo.toml` files as explained in the [Getting Started] guide.
|
|
|
|
|
|
|
|
[Getting Started]: ../getting-started
|