Cargo Features

[dependencies]
kvarn = { version = "0.6.1", default-features = false, features = ["full", "base", "all-compression", "br", "gzip", "all-http", "https", "http2", "http3", "graceful-shutdown", "handover", "auto-hostname", "nonce", "websocket", "async-networking", "uring"] }
default = full

The full feature is set by default whenever kvarn is added without default-features = false somewhere in the dependency tree.

full default = all-compression, all-http, auto-hostname, base, graceful-shutdown, nonce, websocket

Enable all features

base full = async-networking, handover

Enable basic features (for all devices but embedded)

all-compression full = br, gzip

Compressing

br all-compression? = brotli

Affects comprash::CompressionOptions.brotli_level

gzip all-compression? = flate2

Affects comprash::CompressionOptions.gzip_level

all-http full = http2, http3, https

HTTP standards

https all-http? http2? http3? = async-networking, rustls, rustls-pemfile, webpki

Affects host::Host.certificate, host::CertificateError, host::get_certified_key

http2 all-http? = h2, https

Affects application::H2SendResponse

http3 all-http? = h3, h3-quinn, https, quinn, rustls-21
graceful-shutdown full = handover

Graceful shutdown; shutdown.rs

handover base? graceful-shutdown? = kvarn_signal

Handover

Affects kvarn::ctl

auto-hostname full = x509-parser

Automatic populating of Host name and alt-names

nonce full = base64, memchr, rand

nonce implementation

websocket full = base64, futures-util, sha-1, tokio-tungstenite

WebSockets

async-networking base? https? uring? = socket2

Use tokio's async networking instead of the blocking variant.

Enables net of tokio

Range because of vulnerability https://rustsec.org/advisories/RUSTSEC-2023-0001.html

uring = async-networking, tokio-uring

Enables uring of kvarn_signal

Affects extensions::RetFut, extensions::RetSyncFut, extensions::KvarnSendSync, extensions::If, extensions::ready, kvarn::spawn

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

socket2 async-networking?
h2 http2?
kvarn_signal handover? uring?
tokio-uring uring?

Enables kvarn-tokio-uring

rustls https?

Enables rustls ^0.22

HTTPS

rustls-21 http3?

Enables rustls ^0.21

bad hack because quinn hasn't updated yet

rustls-pemfile https?
webpki https?
base64 nonce? websocket?

Enables base64 ^0.21

nonce

memchr nonce?
rand nonce?
x509-parser auto-hostname?

Enables x509-parser ^0.15

Automatic hostname

brotli br?

Enables brotli ^3

Compression

flate2 gzip?
tokio-tungstenite websocket?

Enables tokio-tungstenite

WebSockets

sha-1 websocket?
futures-util websocket?
h3 http3?

Enables h3

HTTP/3

h3-quinn http3?

Enables kvarn-h3-quinn

quinn http3?

Enables kvarn-quinn