-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b5000e
commit 4dbd87a
Showing
22 changed files
with
587 additions
and
29 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocket_contrib_codegen" | ||
version = "0.4.0-dev" | ||
version = "0.4.0-rc.1" | ||
authors = ["Sergio Benitez <[email protected]>"] | ||
description = "Procedural macros for the Rocket contrib libraries." | ||
documentation = "https://api.rocket.rs/v0.4/rocket_contrib/" | ||
|
@@ -9,7 +9,7 @@ repository = "https://github.com/SergioBenitez/Rocket" | |
readme = "../../README.md" | ||
keywords = ["rocket", "contrib", "code", "generation", "proc-macro"] | ||
license = "MIT/Apache-2.0" | ||
build = "../../core/lib/build.rs" | ||
build = "build.rs" | ||
|
||
[features] | ||
database_attribute = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//! This tiny build script ensures that rocket is not compiled with an | ||
//! incompatible version of rust. | ||
extern crate yansi; | ||
extern crate version_check; | ||
|
||
use yansi::Color::{Red, Yellow, Blue, White}; | ||
use version_check::{supports_features, is_min_version, is_min_date}; | ||
|
||
// Specifies the minimum nightly version needed to compile Rocket. | ||
const MIN_DATE: &'static str = "2018-10-05"; | ||
const MIN_VERSION: &'static str = "1.31.0-nightly"; | ||
|
||
fn main() { | ||
let ok_channel = supports_features(); | ||
let ok_version = is_min_version(MIN_VERSION); | ||
let ok_date = is_min_date(MIN_DATE); | ||
let triple = (ok_channel, ok_version, ok_date); | ||
|
||
let print_version_err = |version: &str, date: &str| { | ||
eprintln!("{} {}. {} {}.", | ||
White.paint("Installed version is:"), | ||
Yellow.paint(format!("{} ({})", version, date)), | ||
White.paint("Minimum required:"), | ||
Yellow.paint(format!("{} ({})", MIN_VERSION, MIN_DATE))); | ||
}; | ||
|
||
if let (Some(ok_channel), Some((ok_version, version)), Some((ok_date, date))) = triple { | ||
if !ok_channel { | ||
eprintln!("{} {}", | ||
Red.paint("Error:").bold(), | ||
White.paint("Rocket requires a nightly or dev version of Rust.")); | ||
print_version_err(&*version, &*date); | ||
eprintln!("{}{}{}", | ||
Blue.paint("See the getting started guide ("), | ||
White.paint("https://rocket.rs/v0.4/guide/getting-started/"), | ||
Blue.paint(") for more information.")); | ||
panic!("Aborting compilation due to incompatible compiler.") | ||
} | ||
|
||
if !ok_version || !ok_date { | ||
eprintln!("{} {}", | ||
Red.paint("Error:").bold(), | ||
White.paint("Rocket requires a more recent version of rustc.")); | ||
eprintln!("{}{}{}", | ||
Blue.paint("Use `"), | ||
White.paint("rustup update"), | ||
Blue.paint("` or your preferred method to update Rust.")); | ||
print_version_err(&*version, &*date); | ||
panic!("Aborting compilation due to incompatible compiler.") | ||
} | ||
} else { | ||
println!("cargo:warning={}", "Rocket was unable to check rustc compatibility."); | ||
println!("cargo:warning={}", "Build may fail due to incompatible rustc version."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocket_contrib" | ||
version = "0.4.0-dev" | ||
version = "0.4.0-rc.1" | ||
authors = ["Sergio Benitez <[email protected]>"] | ||
description = "Community contributed libraries for the Rocket web framework." | ||
documentation = "https://api.rocket.rs/v0.4/rocket_contrib/" | ||
|
@@ -35,8 +35,8 @@ redis_pool = ["databases", "redis", "r2d2_redis"] | |
|
||
[dependencies] | ||
# Global dependencies. | ||
rocket_contrib_codegen = { version = "0.4.0-rc", path = "../codegen", optional = true } | ||
rocket = { version = "0.4.0-rc", path = "../../core/lib/" } | ||
rocket_contrib_codegen = { version = "0.4.0-rc.1", path = "../codegen", optional = true } | ||
rocket = { version = "0.4.0-rc.1", path = "../../core/lib/" } | ||
log = "0.4" | ||
|
||
# Serialization and templating dependencies. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocket_codegen" | ||
version = "0.4.0-dev" | ||
version = "0.4.0-rc.1" | ||
authors = ["Sergio Benitez <[email protected]>"] | ||
description = "Procedural macros for the Rocket web framework." | ||
documentation = "https://api.rocket.rs/v0.4/rocket_codegen/" | ||
|
@@ -9,21 +9,21 @@ repository = "https://github.com/SergioBenitez/Rocket" | |
readme = "../../README.md" | ||
keywords = ["rocket", "web", "framework", "code", "generation"] | ||
license = "MIT/Apache-2.0" | ||
build = "../lib/build.rs" | ||
build = "build.rs" | ||
|
||
[lib] | ||
proc-macro = true | ||
|
||
[dependencies] | ||
indexmap = "1.0" | ||
quote = "0.6.1" | ||
rocket_http = { version = "0.4.0-dev", path = "../http/" } | ||
rocket_http = { version = "0.4.0-rc.1", path = "../http/" } | ||
devise = "0.1" | ||
|
||
[build-dependencies] | ||
yansi = "0.4" | ||
version_check = "0.1.3" | ||
|
||
[dev-dependencies] | ||
rocket = { version = "0.4.0-dev", path = "../lib" } | ||
rocket = { version = "0.4.0-rc.1", path = "../lib" } | ||
compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//! This tiny build script ensures that rocket is not compiled with an | ||
//! incompatible version of rust. | ||
extern crate yansi; | ||
extern crate version_check; | ||
|
||
use yansi::Color::{Red, Yellow, Blue, White}; | ||
use version_check::{supports_features, is_min_version, is_min_date}; | ||
|
||
// Specifies the minimum nightly version needed to compile Rocket. | ||
const MIN_DATE: &'static str = "2018-10-05"; | ||
const MIN_VERSION: &'static str = "1.31.0-nightly"; | ||
|
||
fn main() { | ||
let ok_channel = supports_features(); | ||
let ok_version = is_min_version(MIN_VERSION); | ||
let ok_date = is_min_date(MIN_DATE); | ||
let triple = (ok_channel, ok_version, ok_date); | ||
|
||
let print_version_err = |version: &str, date: &str| { | ||
eprintln!("{} {}. {} {}.", | ||
White.paint("Installed version is:"), | ||
Yellow.paint(format!("{} ({})", version, date)), | ||
White.paint("Minimum required:"), | ||
Yellow.paint(format!("{} ({})", MIN_VERSION, MIN_DATE))); | ||
}; | ||
|
||
if let (Some(ok_channel), Some((ok_version, version)), Some((ok_date, date))) = triple { | ||
if !ok_channel { | ||
eprintln!("{} {}", | ||
Red.paint("Error:").bold(), | ||
White.paint("Rocket requires a nightly or dev version of Rust.")); | ||
print_version_err(&*version, &*date); | ||
eprintln!("{}{}{}", | ||
Blue.paint("See the getting started guide ("), | ||
White.paint("https://rocket.rs/v0.4/guide/getting-started/"), | ||
Blue.paint(") for more information.")); | ||
panic!("Aborting compilation due to incompatible compiler.") | ||
} | ||
|
||
if !ok_version || !ok_date { | ||
eprintln!("{} {}", | ||
Red.paint("Error:").bold(), | ||
White.paint("Rocket requires a more recent version of rustc.")); | ||
eprintln!("{}{}{}", | ||
Blue.paint("Use `"), | ||
White.paint("rustup update"), | ||
Blue.paint("` or your preferred method to update Rust.")); | ||
print_version_err(&*version, &*date); | ||
panic!("Aborting compilation due to incompatible compiler.") | ||
} | ||
} else { | ||
println!("cargo:warning={}", "Rocket was unable to check rustc compatibility."); | ||
println!("cargo:warning={}", "Build may fail due to incompatible rustc version."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocket_http" | ||
version = "0.4.0-dev" | ||
version = "0.4.0-rc.1" | ||
authors = ["Sergio Benitez <[email protected]>"] | ||
description = """ | ||
Types, traits, and parsers for HTTP requests, responses, and headers. | ||
|
@@ -34,4 +34,4 @@ features = ["server"] | |
optional = true | ||
|
||
[dev-dependencies] | ||
rocket = { version = "0.4.0-dev", path = "../lib" } | ||
rocket = { version = "0.4.0-rc.1", path = "../lib" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocket" | ||
version = "0.4.0-dev" | ||
version = "0.4.0-rc.1" | ||
authors = ["Sergio Benitez <[email protected]>"] | ||
description = """ | ||
Web framework for nightly with a focus on ease-of-use, expressibility, and speed. | ||
|
@@ -18,8 +18,8 @@ categories = ["web-programming::http-server"] | |
tls = ["rocket_http/tls"] | ||
|
||
[dependencies] | ||
rocket_codegen = { version = "0.4.0-dev", path = "../codegen" } | ||
rocket_http = { version = "0.4.0-dev", path = "../http" } | ||
rocket_codegen = { version = "0.4.0-rc.1", path = "../codegen" } | ||
rocket_http = { version = "0.4.0-rc.1", path = "../http" } | ||
yansi = "0.4" | ||
log = "0.4" | ||
toml = "0.4.7" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Rocket v0.4 Release Candidate | ||
|
||
<p class="metadata"><strong> | ||
Posted by <a href="https://sergio.bz">Sergio Benitez</a> on October 31, 2018 | ||
</strong></p> | ||
|
||
I am delighted to announce that a release candidate for Rocket v0.4 is available | ||
today! This release brings over a year of features, improvements, and | ||
refinements, resolving some of the most called for requests and bringing Rocket | ||
measurably closer to stable compatibility. | ||
|
||
The release candidate is an opportunity to discover issues with Rocket v0.4 and | ||
its documentation before its general release. We encourage all users to migrate | ||
their applications to the release candidate and report any issues to the [GitHub | ||
issue tracker]. | ||
|
||
Barring any major issues, the general release of Rocket v0.4 is planned for | ||
Friday, November 9th, when we'll post a full news article covering the biggest | ||
features and changes in Rocket v0.4. Until then, the [CHANGELOG] contains every | ||
feature addition, change, and improvement since v0.3, as well as information on | ||
migrating your applications to v0.4. All documentation, including the [guide] | ||
and [API docs], has been updated in full for v0.4. | ||
|
||
We're excited for your feedback, and we look forward to seeing you again on | ||
Friday, November 9th for the general release! | ||
|
||
[GitHub issue tracker]: https://github.com/SergioBenitez/Rocket/issues | ||
[API docs]: https://api.rocket.rs/v0.4/rocket/ | ||
[guide]: ../../guide | ||
[CHANGELOG]: https://github.com/SergioBenitez/Rocket/tree/v0.4/CHANGELOG.md#version-040-rc-oct-31-2018 | ||
|
||
## About Rocket | ||
|
||
Rocket is a web framework for Rust with a focus on ease of use, expressibility, | ||
and speed. Rocket makes it simple to write fast web applications without | ||
sacrificing flexibility or type safety. All with minimal code. | ||
|
||
Not already using Rocket? Join the tens of thousands of users and hundreds of | ||
companies happily using Rocket today! Rocket's extensive documentation makes it | ||
easy. Get started now by [reading through the guide](../../guide) or learning | ||
more from [the overview](../../overview). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters