rocket 0.2.9

Web framework for nightly with a focus on ease-of-use, expressibility, and speed. failed to build rocket-0.2.9
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure builds.
If you believe this is' fault, open an issue.
Visit the last successful build: rocket-0.4.5

Rocket - Core API Documentation

Hello, and welcome to the core Rocket API documentation!

This API documentation is highly technical and is purely a reference. There's an overview of Rocket on the main site as well as a full, detailed guide. If you'd like pointers on getting started, see the quickstart or getting started chapters of the guide.

You may also be interested in looking at the contrib API documentation, which contains JSON and templating support, among other features.


Rocket's functionality is split into three crates:

  1. Core - The core library. Needed by every Rocket application.
  2. Codegen - Core code generation plugin. Should always be used alongsize rocket, though it's not necessary.
  3. Contrib - Provides useful functionality for many Rocket applications. Completely optional.


The sanctioned way to use Rocket is via the code generation plugin. This makes Rocket easier and safer to use and allows a somewhat stable API as Rocket matures. To use Rocket with the code generation plugin in your Cargo-based project, add the following to Cargo.toml:

rocket = "*"
rocket_codegen = "*"

If you'll be deploying your project to, you'll need to change the "*" to the current version of Rocket.

Then, add the following to the top of your file:

# #![allow(unused_attributes)]

extern crate rocket;

See the guide for more information on how to write Rocket applications. Here's a simple example to get you started:


extern crate rocket;

fn hello() -> &'static str {
    "Hello, world!"

fn main() {
# if false { // We don't actually want to launch the server in an example.
    rocket::ignite().mount("/", routes![hello]).launch()
# }


Rocket and Rocket libraries are configured via the Rocket.toml file and/or ROCKET_{PARAM} environment variables. For more information on how to configure Rocket, see the configuration section of the guide as well as the config module documentation.


Rocket includes a small testing library that can be used to test your Rocket application. For information on how to test your Rocket applications, see the testing module documentation.