-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
141 lines (115 loc) · 4.42 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[package]
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.6.3"
authors = ["Icelk <[email protected]>"]
edition = "2021"
rust-version = "1.64"
description = "A forward-thinking fast web server designed to fit your needs, efficiently."
# main branch documentation
# documentation = "https://doc.kvarn.org/kvarn/"
readme = "README.md"
homepage = "https://kvarn.org/"
repository = "https://github.com/Icelk/kvarn/"
license = "Apache-2.0"
keywords = ["web", "web-server", "web-application", "web-framework"]
categories = ["web-programming", "web-programming::http-server", "web-programming::websocket"]
[workspace]
members = [
"./",
"extensions",
"chute",
"utils",
"async",
"url-crawl",
"testing",
"signal",
"ctl",
]
[dependencies]
bytes = "1"
compact_str = "0.8.0"
log = "0.4"
time = { version = "0.3", features = ["parsing", "formatting", "macros"] }
socket2 = { version = "0.5.3", optional = true, features = ["all"] }
h2 = { version = "0.4.5", 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.6.1" }
kvarn_utils = { path = "utils", version = "0.6.1" }
kvarn_signal = { path = "signal", version = "0.2.1", 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 = "6"
# HTTPS
rustls = { version = "0.23.8", optional = true, features = ["std", "ring", "logging", "tls12"], default-features = false }
rustls-pemfile = { version = "2.1", optional = true }
rustls-webpki = { version = "0.102", optional = true, default-features = false, features = ["ring", "std"] }
# nonce
base64 = { version = "0.22", optional = true }
memchr = { version = "2", optional = true }
rand = { version = "0.9", optional = true, features = ["small_rng"] }
# Compression
brotli = { version = "7", optional = true }
flate2 = { version = "1", optional = true }
zstd = { version = "0.13", optional = true, default-features = false }
# WebSockets
tokio-tungstenite = { version = "0.26", 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.6", optional = true }
h3-quinn = { version = "0.0.7", optional = true }
quinn = { version = "0.11.1", default-features = false, features = ["rustls", "log", "runtime-tokio"], optional = true }
[target.'cfg(unix)'.dependencies]
libc = { version = "0.2", default-features = false }
[features]
default = ["full"]
# Enable all features
full = ["all-http", "all-compression", "graceful-shutdown", "nonce", "websocket", "base"]
# Enable basic features (for all devices but embedded)
base = ["async-networking", "handover"]
# Compressing
all-compression = ["br", "gzip", "zstd"]
br = ["brotli"]
gzip = ["flate2"]
zstd = ["dep:zstd"]
zstd-multithread = ["zstd/zstdmt"]
# HTTP standards
all-http = ["https", "http2", "http3"]
https = ["rustls", "rustls-pemfile", "rustls-webpki", "async-networking"]
http2 = ["h2", "https"]
http3 = ["h3", "h3-quinn", "quinn", "https"]
# Graceful shutdown; shutdown.rs
graceful-shutdown = ["handover"]
# Handover
handover = ["kvarn_signal"]
# nonce implementation
nonce = ["rand", "base64", "memchr"]
# WebSockets
websocket = ["tokio-tungstenite", "sha-1", "base64", "futures-util"]
# Use tokio's async networking instead of the blocking variant.
async-networking = ["tokio/net", "socket2"]
uring = ["tokio-uring", "kvarn_signal/uring", "async-networking"]
# also add to https://kvarn.org/cargo-features.
[dev-dependencies]
kvarn_testing = { path = "testing", version = "0.6.1" }
# profile for binary sub-crates.
[profile.distribution]
inherits = "release"
lto = true
strip = true
# speed up Kvarn chute's syntax highlighting when developing
[profile.dev.package.regex]
opt-level = 3
[profile.dev.package.fancy-regex]
opt-level = 3
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]