Rocket with local git checkout

At the moment you should start development with the Rust Rocket framework at the 0.5-RC versions.
There has been many changes to the latest stable 0.4 version and the new release is awaited soon.

To stay up-to-date at the release cycle I think it is a good idea to checkout the Rocket Git repository at the v0.5-rc branch to a local sub-directory named rocket.

Git checkout

So go to your cargo project directory and start with the git command:

git clone -b v0.5-rc --depth 5 https://github.com/SergioBenitez/Rocket rocket

Cargo project configuration

To use this local Rocket clone, you have to add the path to your rocket dependency in the Cargo.toml of your project.

Start with something like

[dependencies]
rocket = { path = "rocket" }

Error

But when running cargo check we get an error:

error: failed to get `rocket` as a dependency of package `[...] v0.1.0 ([...])`

Caused by:
  failed to load source for dependency `rocket`

Caused by:
  Unable to update [...]/rocket

Caused by:
  found a virtual manifest at `[...]/rocket/Cargo.toml` instead of a package manifest

Solution

We look in the Cargo.toml in the rocket sub-directory:

[workspace]
members = [
  "core/lib/",
  "core/codegen/",
  "core/http/",
  [...]
]

So there are only members of the workspace referenced. This is not a project.

But member core/lib looks particularly promising.

After a look at rocket/core/lib/Cargo.toml:

[package]
name = "rocket"
version = "0.5.0-rc.1"
[...]

We know this is what we are looking for.

So in the end the working dependency may look like

rocket = { path = "rocket/core/lib" }

You could also add some of the optional features.
For some additional knowledge you could have a look at the Cargo reference.