Before you can start writing a Rocket application, you'll need to install the Rust toolchain. We recommend usingrustup. If you don't have Rust installed and would like extra guidance doing so, seeGetting Started.
The absolute fastest way to start experimenting with Rocket is to clone the Rocket repository and run the included examples in theexamples/
directory. For instance, the following set of commands runs thehello
example:
12345
git clone https://github.com/rwf2/Rocketcd Rocketgit checkout v0.5cd examples/hellocargo run
There are numerous examples in theexamples/
directory. They can all be run withcargo run
.
The examples'Cargo.toml
files will point to the locally clonedrocket
libraries. When copying the examples for your own use, you should modify theCargo.toml
files as explained in theGetting Started guide.