Rocket/contrib/lib/Cargo.toml
Sergio Benitez 1fb061496d Revamp configuration.
This commit completely overhauls Rocket's configuration systems, basing
it on the new Figment library. It includes many breaking changes
pertaining to configuration. They are:

  * "Environments" are replaced by "profiles".
  * 'ROCKET_PROFILE' takes the place of 'ROCKET_ENV'.
  * Profile names are now arbitrary, but 'debug' and 'release' are given
    special treatment as default profiles for the debug and release
    compilation profiles.
  * A 'default' profile now sits along-side the meta 'global' profile.
  * The concept of "extras" is no longer present; users can extract any
    values they want from the configured 'Figment'.
  * The 'Poolable' trait takes an '&Config'.
  * The 'secrets' feature is disabled by default.
  * It is a hard error if 'secrets' is enabled under the 'release'
    profile and no 'secret_key' is configured.
  * 'ConfigBuilder' no longer exists: all fields of 'Config' are public
    with public constructors for each type.
  * 'keep_alive' is disabled with '0', not 'false' or 'off'.
  * Inlined error variants into the 'Error' structure.
  * 'LoggingLevel' is now 'LogLevel'.
  * Limits can now be specified in SI units: "1 MiB".

The summary of other changes are:

  * The default config file can be configured with 'ROCKET_CONFIG'.
  * HTTP/1 and HTTP/2 keep-alive configuration is restored.
  * 'ctrlc' is now a recognized config option.
  * 'serde' is now a core dependency.
  * TLS misconfiguration errors are improved.
  * Several example use '_' as the return type of '#[launch]' fns.
  * 'AdHoc::config()' was added for simple config extraction.
  * Added more documentation for using 'Limits'.
  * Launch information is no longer treated specially.
  * The configuration guide was rewritten.

Resolves #852.
Resolves #209.
Closes #1404.
Closes #652.
2020-10-20 19:21:56 -07:00

85 lines
3.0 KiB
TOML

[package]
name = "rocket_contrib"
version = "0.5.0-dev"
authors = ["Sergio Benitez <sb@sergio.bz>"]
description = "Community contributed libraries for the Rocket web framework."
documentation = "https://api.rocket.rs/v0.5/rocket_contrib/"
homepage = "https://rocket.rs"
repository = "https://github.com/SergioBenitez/Rocket"
readme = "../../README.md"
keywords = ["rocket", "web", "framework", "contrib", "contributed"]
license = "MIT OR Apache-2.0"
edition = "2018"
[features]
# Internal use only.
templates = ["serde", "serde_json", "glob", "notify"]
databases = [
"serde", "r2d2", "tokio/blocking", "tokio/rt-threaded",
"rocket_contrib_codegen/database_attribute"
]
# User-facing features.
default = ["json", "serve"]
json = ["serde", "serde_json", "tokio/io-util"]
msgpack = ["serde", "rmp-serde", "tokio/io-util"]
tera_templates = ["tera", "templates"]
handlebars_templates = ["handlebars", "templates"]
helmet = ["time"]
serve = []
compression = ["brotli_compression", "gzip_compression"]
brotli_compression = ["brotli"]
gzip_compression = ["flate2"]
# The barage of user-facing database features.
diesel_sqlite_pool = ["databases", "diesel/sqlite", "diesel/r2d2"]
diesel_postgres_pool = ["databases", "diesel/postgres", "diesel/r2d2"]
diesel_mysql_pool = ["databases", "diesel/mysql", "diesel/r2d2"]
postgres_pool = ["databases", "postgres", "r2d2_postgres"]
mysql_pool = ["databases", "mysql", "r2d2_mysql"]
sqlite_pool = ["databases", "rusqlite", "r2d2_sqlite"]
memcache_pool = ["databases", "memcache", "r2d2-memcache"]
[dependencies]
# Global dependencies.
tokio = { version = "0.2.0", optional = true }
rocket_contrib_codegen = { version = "0.5.0-dev", path = "../codegen", optional = true }
rocket = { version = "0.5.0-dev", path = "../../core/lib/", default-features = false }
log = "0.4"
# Serialization and templating dependencies.
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0.26", optional = true }
rmp-serde = { version = "0.14.0", optional = true }
# Templating dependencies.
handlebars = { version = "3.0", optional = true }
glob = { version = "0.3", optional = true }
tera = { version = "1.0.2", optional = true }
notify = { version = "4.0.6", optional = true }
# UUID dependencies.
uuid = { version = ">=0.7.0, <0.9.0", optional = true }
# Database dependencies
diesel = { version = "1.0", default-features = false, optional = true }
postgres = { version = "0.17", optional = true }
r2d2 = { version = "0.8", optional = true }
r2d2_postgres = { version = "0.16", optional = true }
mysql = { version = "18.0", optional = true }
r2d2_mysql = { version = "18.0", optional = true }
rusqlite = { version = "0.23", optional = true }
r2d2_sqlite = { version = "0.16", optional = true }
memcache = { version = "0.14", optional = true }
r2d2-memcache = { version = "0.5", optional = true }
# SpaceHelmet dependencies
time = { version = "0.2.9", optional = true }
# Compression dependencies
brotli = { version = "3.3", optional = true }
flate2 = { version = "1.0", optional = true }
[package.metadata.docs.rs]
all-features = true