2017-04-17 02:48:59 +00:00
|
|
|
# Quickstart
|
|
|
|
|
2020-07-21 21:28:49 +00:00
|
|
|
Before you can start writing a Rocket application, you'll need to install the
|
|
|
|
Rust toolchain. We recommend using [rustup](https://rustup.rs/). If you don't
|
|
|
|
have Rust installed and would like extra guidance doing so, see the [getting
|
|
|
|
started](../getting-started) 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.
|
2021-05-22 23:42:27 +00:00
|
|
|
For instance, the following set of commands runs the `hello` example:
|
2017-04-17 02:48:59 +00:00
|
|
|
|
|
|
|
```sh
|
2023-11-21 15:29:44 +00:00
|
|
|
git clone https://github.com/rwf2/Rocket
|
2017-07-01 01:36:59 +00:00
|
|
|
cd Rocket
|
2023-11-03 23:26:07 +00:00
|
|
|
git checkout v0.5
|
2021-05-22 23:42:27 +00:00
|
|
|
cd examples/hello
|
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
|