Skip to content

Commit

Permalink
wip: http/3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Mar 15, 2024
1 parent 50c44e8 commit 6e66806
Show file tree
Hide file tree
Showing 39 changed files with 1,300 additions and 902 deletions.
14 changes: 12 additions & 2 deletions core/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ all-features = true
[features]
default = ["http2", "tokio-macros"]
http2 = ["hyper/http2", "hyper-util/http2"]
http3 = ["s2n-quic", "s2n-quic-h3", "tls"]
secrets = ["cookie/private", "cookie/key-expansion"]
json = ["serde_json"]
msgpack = ["rmp-serde"]
Expand Down Expand Up @@ -76,8 +77,7 @@ futures = { version = "0.3.30", default-features = false, features = ["std"] }
state = "0.6"

[dependencies.hyper-util]
git = "https://github.com/SergioBenitez/hyper-util.git"
branch = "fix-readversion"
version = "0.1.3"
default-features = false
features = ["http1", "server", "tokio"]

Expand All @@ -99,6 +99,16 @@ version = "0.6.0-dev"
path = "../http"
features = ["serde"]

[dependencies.s2n-quic]
version = "1.32"
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"

Expand Down
8 changes: 4 additions & 4 deletions core/lib/src/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
use yansi::{Paint, Style, Color::Primary};

use crate::log::PaintExt;
use crate::config::{LogLevel, Shutdown, Ident, CliColors};
use crate::config::{LogLevel, ShutdownConfig, Ident, CliColors};
use crate::request::{self, Request, FromRequest};
use crate::http::uncased::Uncased;
use crate::data::Limits;
Expand Down Expand Up @@ -120,8 +120,8 @@ pub struct Config {
#[cfg_attr(nightly, doc(cfg(feature = "secrets")))]
#[serde(serialize_with = "SecretKey::serialize_zero")]
pub secret_key: SecretKey,
/// Graceful shutdown configuration. **(default: [`Shutdown::default()`])**
pub shutdown: Shutdown,
/// Graceful shutdown configuration. **(default: [`ShutdownConfig::default()`])**
pub shutdown: ShutdownConfig,
/// Max level to log. **(default: _debug_ `normal` / _release_ `critical`)**
pub log_level: LogLevel,
/// Whether to use colors and emoji when logging. **(default:
Expand Down Expand Up @@ -200,7 +200,7 @@ impl Config {
keep_alive: 5,
#[cfg(feature = "secrets")]
secret_key: SecretKey::zero(),
shutdown: Shutdown::default(),
shutdown: ShutdownConfig::default(),
log_level: LogLevel::Normal,
cli_colors: CliColors::Auto,
__non_exhaustive: (),
Expand Down
Loading

0 comments on commit 6e66806

Please sign in to comment.