Skip to content

Commit

Permalink
Massive update. Every dep updated. Rustls 0.22. Proper QUIC. Release …
Browse files Browse the repository at this point in the history
…0.6 soon.
  • Loading branch information
Icelk committed Feb 4, 2024
1 parent e5cc1b3 commit 9348cc6
Show file tree
Hide file tree
Showing 23 changed files with 322 additions and 176 deletions.
35 changes: 19 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "kvarn"
# also bump all other versions (e.g. `grep 0\\.3`)
# remove "#![doc(html_root_url = "https://doc.kvarn.org/")]" from lib.rs
version = "0.5.0"
version = "0.6.0"
authors = ["Icelk <main@icelk.dev>"]
edition = "2021"
rust-version = "1.56"
Expand Down Expand Up @@ -36,26 +36,29 @@ log = "0.4"
time = { version = "0.3", features = ["parsing", "formatting", "macros"] }
socket2 = { version = "0.5.3", optional = true, features = ["all"] }

h2 = { version = "0.3.17", default-features = false, optional = true }
http = "0.2"
h2 = { version = "0.4.2", default-features = false, optional = true }
http = "1.0"
mime = "0.3"
mime_guess = "2"
tree_magic_mini = { version = "3", features = ["tree_magic_db"] }
percent-encoding = "2"

kvarn_async = { path = "async", version = "0.5.0" }
kvarn_utils = { path = "utils", version = "0.5.0" }
kvarn_signal = { path = "signal", version = "0.1", optional = true }
kvarn_async = { path = "async", version = "0.6.0" }
kvarn_utils = { path = "utils", version = "0.6.0" }
kvarn_signal = { path = "signal", version = "0.2", optional = true }
# Range because of vulnerability https://rustsec.org/advisories/RUSTSEC-2023-0001.html
tokio = { version = "1, >=1.23.1", features = ["rt", "io-util", "fs", "sync", "parking_lot", "time", "macros"] }
tokio-uring = { git = "https://github.com/Icelk/tokio-uring", branch = "recvmsg-msg_control", features = ["bytes"], optional = true }
tokio = { version = "1.24", features = ["rt", "io-util", "fs", "sync", "parking_lot", "time", "macros"] }
# tokio-uring = { git = "https://github.com/Icelk/tokio-uring", branch = "recvmsg-msg_control", features = ["bytes"], optional = true }
tokio-uring = { version = "0.4.0-alpha1", package = "kvarn-tokio-uring", features = ["bytes"], optional = true }

moka = { version = "0.12", features = ["sync"], default-features = false }
dashmap = "5"

# HTTPS
rustls = { version = "0.21", optional = true }
rustls-pemfile = { version = "1.0", optional = true }
rustls = { version = "0.22", optional = true }
# bad hack because quinn hasn't updated yet
rustls-21 = { version = "0.21", package = "rustls", optional = true }
rustls-pemfile = { version = "2.0", optional = true }
webpki = { version = "0.22", optional = true }

# nonce
Expand All @@ -71,14 +74,14 @@ brotli = { version = "3", optional = true }
flate2 = { version = "1", optional = true }

# WebSockets
tokio-tungstenite = { version = "0.20", optional = true, default-features = false }
tokio-tungstenite = { version = "0.21", optional = true, default-features = false }
sha-1 = { version = "0.10", optional = true }
futures-util = { version = "0.3", optional = true, default-features = false, features = ["sink"] }

# HTTP/3
h3 = { version = "0.0.3", optional = true }
h3-quinn = { version = "0.0.4", optional = true }
quinn = { version = "0.10.1", default-features = false, features = ["tls-rustls", "log", "runtime-tokio"], optional = true }
h3 = { version = "0.0.4", optional = true }
h3-quinn = { version = "0.0.6-alpha1", package = "kvarn-h3-quinn", optional = true }
quinn = { version = "0.11.0-alpha1", package = "kvarn-quinn", default-features = false, features = ["tls-rustls", "log", "runtime-tokio"], optional = true }

[target.'cfg(unix)'.dependencies]
libc = { version = "0.2", default-features = false }
Expand All @@ -101,7 +104,7 @@ gzip = ["flate2"]
all-http = ["https", "http2", "http3"]
https = ["rustls", "rustls-pemfile", "webpki", "async-networking"]
http2 = ["h2", "https"]
http3 = ["h3", "h3-quinn", "quinn", "https"]
http3 = ["h3", "h3-quinn", "quinn", "rustls-21", "https"]

# Graceful shutdown; shutdown.rs
graceful-shutdown = ["handover"]
Expand All @@ -125,7 +128,7 @@ uring = ["tokio-uring", "kvarn_signal/uring", "async-networking"]
# also add to https://kvarn.org/cargo-features.

[dev-dependencies]
kvarn_testing = { path = "testing", version = "0.5" }
kvarn_testing = { path = "testing", version = "0.6" }

# profile for binary sub-crates.
[profile.distribution]
Expand Down
8 changes: 4 additions & 4 deletions async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kvarn_async"
version = "0.5.0"
version = "0.6.0"
authors = ["Icelk <main@icelk.dev>"]
edition = "2021"
rust-version = "1.56"
Expand All @@ -14,6 +14,6 @@ categories = ["web-programming", "asynchronous"]

[dependencies]
bytes = "1"
http = "0.2"
kvarn_utils = { path = "../utils", version = "0.5" }
tokio = { version = "1, >=1.23.1", features = ["rt", "io-util", "fs", "sync", "parking_lot", "time"] }
http = "1.0"
kvarn_utils = { path = "../utils", version = "0.6" }
tokio = { version = "1.24", features = ["rt", "io-util", "fs", "sync", "parking_lot", "time"] }
4 changes: 2 additions & 2 deletions chute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ required-features = ["bin"]

[dependencies]
colored = "2.0"
pulldown-cmark = { version = "0.9", default-features = false, features = ["simd"] }
pulldown-cmark = { version = "0.10", default-features = false, features = ["simd", "html"] }
notify = "6"
unicode_categories = "0.1"
time = { version = "0.3", optional = true, features = ["formatting", "macros", "local-offset"] }
Expand All @@ -29,7 +29,7 @@ kvarn_utils = "0.5"
# Bin deps
clap = { version = "4", optional = true, features = ["cargo"] }
clap_autocomplete = { version = ">= 0.4.1", optional = true }
env_logger = { version = "0.10", optional = true, default-features = false, features = ["auto-color", "humantime"] }
env_logger = { version = "0.11", optional = true, default-features = false, features = ["auto-color", "humantime"] }
log = { version = "0.4.17", optional = true }
notify-debouncer-full = { version = "0.3", default-features = false }
syntect = { version = "5.0.0", default-features = false, features = ["default-fancy"] }
Expand Down
6 changes: 3 additions & 3 deletions chute/src/highlight.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use pulldown_cmark::{CodeBlockKind, CowStr, Event, Tag};
use pulldown_cmark::{CodeBlockKind, CowStr, Event, Tag, TagEnd};
use syntect::easy::HighlightLines;
use syntect::highlighting::{Color, FontStyle, Style, ThemeSet};
use syntect::parsing::SyntaxSet;
Expand Down Expand Up @@ -44,7 +44,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for SyntaxPreprocessor<'a, I> {
CowStr::Boxed(s.into())
}
}
Some(Event::End(Tag::CodeBlock(_))) | None => break,
Some(Event::End(TagEnd::CodeBlock)) | None => break,
Some(e) => {
return Some(Event::Text(
format!("Unexpected markdown event {:#?}", e).into(),
Expand All @@ -54,7 +54,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for SyntaxPreprocessor<'a, I> {
}
code
}
Some(Event::End(Tag::CodeBlock(_))) | None => CowStr::Borrowed(""),
Some(Event::End(TagEnd::CodeBlock)) | None => CowStr::Borrowed(""),
Some(e) => {
return Some(Event::Text(
format!("Unexpected markdown event {:#?}", e).into(),
Expand Down
2 changes: 1 addition & 1 deletion chute/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ fn process_inner<P: AsRef<Path>>(

let mut parser_header_index = 0;
let parser = parser.map(|event| match event {
Event::Start(Tag::Heading(level, _, classes)) => {
Event::Start(Tag::Heading { level, classes, .. }) => {
let Header { anchor, .. } = &headers[parser_header_index];
parser_header_index += 1;

Expand Down
8 changes: 4 additions & 4 deletions ctl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ categories = ["command-line-utilities"]
[dependencies]
clap = { version = "4", features = ["cargo"] }
clap_autocomplete = { version = ">= 0.4.1", optional = true }
env_logger = { version = "0.10", default-features = false, features = ["auto-color", "humantime"] }
kvarn_signal = { path = "../signal", version = "0.1" }
kvarn_utils = { path = "../utils", version = "0.5" }
env_logger = { version = "0.11", default-features = false, features = ["auto-color", "humantime"] }
kvarn_signal = { path = "../signal", version = "0.2" }
kvarn_utils = { path = "../utils", version = "0.6" }
log = "0.4"
tokio = { version = "1, >=1.23.1", features = ["rt", "io-util", "macros", "time"] }
tokio = { version = "1.24", features = ["rt", "io-util", "macros", "time"] }

[features]
default = ["completion"]
Expand Down
23 changes: 12 additions & 11 deletions extensions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kvarn-extensions"
version = "0.5.0"
version = "0.6.0"
authors = ["Icelk <main@icelk.dev>"]
edition = "2021"
description = "Extensions for the Kvarn web server. Features HTTP/2 automatic push and a templating engine."
Expand All @@ -13,21 +13,22 @@ categories = ["template-engine"]

[dependencies]
futures-util = "0.3"
kvarn = { path = "../", default-features = false, version = "0.5" }
kvarn = { path = "../", default-features = false, version = "0.6" }
kvarn-fastcgi-client = { version = "0.1", optional = true }
tokio = { version = "1, >=1.23.1", features = ["fs"] }
tokio-uring = { git = "https://github.com/Icelk/tokio-uring", branch = "recvmsg-msg_control", features = ["bytes"], optional = true }
tokio = { version = "1.24", features = ["fs"] }
# tokio-uring = { git = "https://github.com/Icelk/tokio-uring", branch = "recvmsg-msg_control", features = ["bytes"], optional = true }
tokio-uring = { version = "0.4.0-alpha1", package = "kvarn-tokio-uring", features = ["bytes"], optional = true }
async_chunked_transfer = "1.4"
percent-encoding = { version = "2", optional = true }
memchr = "2"
url-crawl = { path = "../url-crawl", optional = true }
small-acme = { version = ">= 0.1.2, < 0.2", optional = true }
small-acme = { version = "0.2.2", optional = true }
x509-parser = { version = "0.15", optional = true }
rustls = { version = "0.21", optional = true, default-features = false }
rustls = { version = "0.22", optional = true, default-features = false }
# serialize credentials
ron = { version = "0.8", optional = true }
rcgen = { version = "0.11", optional = true }
rustls-pemfile = { version = "1", optional = true }
rcgen = { version = "0.12", optional = true }
rustls-pemfile = { version = "2", optional = true }
rand = { version = "0.8", optional = true }
dashmap = { version = "5", optional = true }

Expand All @@ -36,16 +37,16 @@ default = ["php", "templates", "push", "view-counter"]
connection = ["tokio/net", "tokio/io-util"]
php = ["kvarn-fastcgi-client", "connection", "percent-encoding"]
templates = []
push = ["url-crawl"]
push = ["url-crawl", "kvarn/http2"]
reverse-proxy = ["connection", "url-crawl"]
# Automatic HTTPS certificates
certificate = ["small-acme", "x509-parser", "rustls", "rustls-pemfile", "ron", "rcgen", "kvarn/https", "rand"]
view-counter = ["dashmap"]
uring = ["kvarn/uring", "tokio-uring"]

[dev-dependencies]
tokio = { version = "1, >=1.23.1", features = ["net", "io-util", "macros"] }
kvarn_testing = { path = "../testing", version = "0.5" }
tokio = { version = "1.24", features = ["net", "io-util", "macros"] }
kvarn_testing = { path = "../testing", version = "0.6" }

[package.metadata.docs.rs]
all-features = true
Expand Down
Loading

0 comments on commit 9348cc6

Please sign in to comment.