Add doc notes on how to depend on '-dev' versions.

This commit is contained in:
Sergio Benitez 2021-03-27 14:20:43 -07:00
parent 78d749b265
commit 3045e0ac63
2 changed files with 20 additions and 2 deletions

View File

@ -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;

View File

@ -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: