Skip to content

Commit

Permalink
Add doc notes on how to depend on '-dev' versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Mar 27, 2021
1 parent 78d749b commit 3045e0a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@
//! rocket = "0.5.0-dev"
//! ```
//!
//! See the [guide](https://rocket.rs/master/guide) for more information on how to
//! write Rocket applications. Here's a simple example to get you started:
//! <small>Note that development versions, tagged with `-dev`, are not published
//! and will will need to be specified as [git dependencies].</small>
//!
//! See the [guide](https://rocket.rs/master/guide) for more information on how
//! to write Rocket applications. Here's a simple example to get you started:
//!
//! [git dependencies]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories
//!
//! ```rust,no_run
//! #[macro_use] extern crate rocket;
Expand Down
13 changes: 13 additions & 0 deletions site/guide/2-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ Now, add Rocket as a dependency in your `Cargo.toml`:
rocket = "0.5.0-dev"
```

! warning: Development versions must be _git_ dependencies.

Development versions, tagged with `-dev`, are not published. To depend on a
development version of Rocket, you'll need to point `Cargo.toml` to a Rocket
git repository. For example, with `######` replaced with a git commit hash:

`
[dependencies]
`
`
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "######" }
`

Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!`
program, reproduced below:

Expand Down

0 comments on commit 3045e0a

Please sign in to comment.