Rocket/core/lib/Cargo.toml
Sergio Benitez 7cc818cd85 Introduce dynamic TLS resolvers.
This commit introduces the ability to dynamically select a TLS
configuration based on the client's TLS hello via the new `Resolver`
trait. In support of this, it also makes the following changes:

  * Added `Authority::set_port()`.
  * `UdsListener` is now `UnixListener`.
  * `Bindable` removed in favor of new `Bind`.
  * All built-in listeners now implement `Bind<&Rocket>`.
  * `Connection` requires `AsyncRead + AsyncWrite`.
  * The `Debug` impl for `Endpoint` displays the underlying address.
  * `Listener` must be `Sized`.
  * The TLS listener was moved to `tls::TlsListener`.
  * The preview `quic` listener no longer implements `Listener`.
  * Added `TlsConfig::server_config()`.
  * Added `race` future helpers.
  * Added `Rocket::launch_with()`, `Rocket::bind_launch()`.
  * Added a default `client.pem` to the TLS example.
  * Various unnecessary listener `Config` structures removed.

In addition, the testbench was revamped to support more scenarios. This
resulted in the following issues being found and fixed:

  * Fix an issue where the logger would ignore color requests.
  * Clarified docs for `mtls::Certificate` guard.
  * Improved error messages on listener misconfiguration.

Resolves #2730.
Resolves #2363.
Closes #2748.
Closes #2683.
Closes #2577.
2024-04-16 23:50:28 -07:00

145 lines
3.9 KiB
TOML

[package]
name = "rocket"
version = "0.6.0-dev"
authors = ["Sergio Benitez <sb@sergio.bz>"]
description = """
Web framework with a focus on usability, security, extensibility, and speed.
"""
documentation = "https://api.rocket.rs/master/rocket/"
homepage = "https://rocket.rs"
repository = "https://github.com/rwf2/Rocket"
readme = "../../README.md"
keywords = ["rocket", "web", "framework", "server"]
license = "MIT OR Apache-2.0"
build = "build.rs"
categories = ["web-programming::http-server"]
edition = "2021"
rust-version = "1.75"
[package.metadata.docs.rs]
all-features = true
[lints.rust]
rust_2018_idioms = "warn"
# missing_docs = "warn"
async_fn_in_trait = "allow"
refining_impl_trait = "allow"
[lints.clippy]
type_complexity = "allow"
module_inception = "allow"
multiple_bound_locations = "allow"
manual_range_contains = "allow"
[features]
default = ["http2", "tokio-macros"]
http2 = ["hyper/http2", "hyper-util/http2"]
http3-preview = ["s2n-quic", "s2n-quic-h3", "tls"]
secrets = ["cookie/private", "cookie/key-expansion"]
json = ["serde_json"]
msgpack = ["rmp-serde"]
uuid = ["uuid_", "rocket_http/uuid"]
tls = ["rustls", "tokio-rustls", "rustls-pemfile"]
mtls = ["tls", "x509-parser"]
tokio-macros = ["tokio/macros"]
[dependencies]
# Optional serialization dependencies.
serde_json = { version = "1.0.26", optional = true }
rmp-serde = { version = "1", optional = true }
uuid_ = { package = "uuid", version = "1", optional = true, features = ["serde"] }
# Optional MTLS dependencies
x509-parser = { version = "0.16", optional = true }
# Hyper dependencies
http = "1"
bytes = "1.4"
hyper = { version = "1.1", default-features = false, features = ["http1", "server"] }
# Non-optional, core dependencies from here on out.
yansi = { version = "1.0.1", features = ["detect-tty"] }
log = { version = "0.4", features = ["std"] }
num_cpus = "1.0"
time = { version = "0.3", features = ["macros", "parsing"] }
memchr = "2" # TODO: Use pear instead.
binascii = "0.1"
ref-cast = "1.0"
ref-swap = "0.1.2"
parking_lot = "0.12"
ubyte = {version = "0.10.2", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
figment = { version = "0.10.17", features = ["toml", "env"] }
rand = "0.8"
either = "1"
pin-project-lite = "0.2"
indexmap = { version = "2", features = ["serde"] }
tempfile = "3"
async-trait = "0.1.43"
async-stream = "0.3.2"
multer = { version = "3.0.0", features = ["tokio-io"] }
tokio-stream = { version = "0.1.6", features = ["signal", "time"] }
cookie = { version = "0.18", features = ["percent-encode"] }
futures = { version = "0.3.30", default-features = false, features = ["std"] }
state = "0.6"
[dependencies.hyper-util]
version = "0.1.3"
default-features = false
features = ["http1", "server", "tokio"]
[dependencies.tokio]
version = "1.35.1"
features = ["rt-multi-thread", "net", "io-util", "fs", "time", "sync", "signal", "parking_lot"]
[dependencies.tokio-util]
version = "0.7"
default-features = false
features = ["io"]
[dependencies.rocket_codegen]
version = "0.6.0-dev"
path = "../codegen"
[dependencies.rocket_http]
version = "0.6.0-dev"
path = "../http"
features = ["serde"]
[dependencies.rustls]
version = "0.23"
default-features = false
features = ["ring", "logging", "std", "tls12"]
optional = true
[dependencies.tokio-rustls]
version = "0.26"
default-features = false
features = ["logging", "tls12", "ring"]
optional = true
[dependencies.rustls-pemfile]
version = "2.1.0"
optional = true
[dependencies.s2n-quic]
version = "1.36"
default-features = false
features = ["provider-address-token-default", "provider-tls-rustls"]
optional = true
[dependencies.s2n-quic-h3]
git = "https://github.com/SergioBenitez/s2n-quic-h3.git"
optional = true
[target.'cfg(unix)'.dependencies]
libc = "0.2.149"
[build-dependencies]
version_check = "0.9.1"
[dev-dependencies]
tokio = { version = "1", features = ["macros", "io-std"] }
figment = { version = "0.10.17", features = ["test"] }
pretty_assertions = "1"