Cargo Features

[dependencies]
xitca-web = { version = "0.4.1", default-features = false, features = ["http1", "http2", "http3", "io-uring", "openssl", "rustls", "params", "json", "urlencoded", "compress-br", "compress-gz", "compress-de", "cookie", "multipart", "websocket", "file", "rate-limit", "logger", "nightly", "codegen", "tower-http-compat", "serde"] }
default = http1

The http1 feature is set by default whenever xitca-web is added without default-features = false somewhere in the dependency tree.

http1 default = xitca-server

extended http versions.

Enables http1 and runtime of xitca-http

http2 = xitca-server

Enables http2 and runtime of xitca-http

http3 = xitca-server

Enables http3 and runtime of xitca-http

io-uring = xitca-server

linux io-uring async io.

Enables runtime of xitca-http and io-uring of xitca-server

http server

openssl = xitca-server

tls transport layer

Enables openssl and runtime of xitca-http and openssl of xitca-tls

tls

rustls = xitca-server

Enables runtime and rustls of xitca-http, rustls-no-crypto of xitca-tls

params = serde

params type extractor

Affects types::params

json = serde, serde_json

json type extractor/respodner

Affects types::json

urlencoded = serde, serde_urlencoded

urlencoded type extractor

Affects types::query, types::form

compress-br

(de)compression middlewares

Enables br of http-encoding

compress-x

Affects middleware::compress, middleware::decompress

compress-gz

Enables gz of http-encoding

Affects middleware::compress, middleware::decompress

compress-de

Enables de of http-encoding

Affects middleware::compress, middleware::decompress

cookie handler type

Enables cookie

Affects types::cookie

multipart = http-multipart

multipart type extractor

Affects types::multipart

websocket

websocket type extractor/responder

Enables stream of http-ws, time of tokio

Affects types::websocket

file = http-file, nightly

static file serving

Affects service::file

rate-limit = http-rate

rate-limit middleware

Affects middleware::rate_limit

logger = tracing, tracing-subscriber

tracing logging middleware

nightly file?

nightly rust required feature.

IMPORTANT note when utilizing nightly feature:
nightly feature is unstable and would not take part in semver practice. all breaking change origin from it would be seen as non breaking from stable release point of view.

codegen = xitca-codegen

macro code generation

Affects xitca-web::codegen

tower-http-compat = http-body, tower-layer, tower-service

experimental tower-http Layer compat

Affects middleware::tower_http_compat, service::tower_http_compat

serde json? params? urlencoded?

(de)serialization shared feature.

Enables serde

(de)serialization shared.

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.

xitca-server http1 http2? http3? io-uring? openssl? rustls?
xitca-tls openssl? rustls?
serde_json json?

Enables serde_json

json

serde_urlencoded urlencoded?

Enables serde_urlencoded

urlencoded

http-encoding compress-br? compress-de? compress-gz?
http-multipart multipart?

Enables http-multipart

multipart

http-ws websocket?

Enables http-ws

websocket

http-file file?

Enables http-file

static file

http-rate rate-limit?

Enables http-rate

rate limit

tracing logger?

Enables tracing

logger

tracing-subscriber logger?
xitca-codegen codegen?

Enables xitca-codegen

codegen

tower-service tower-http-compat?

Enables tower-service

tower-http-compat

tower-layer tower-http-compat?
http-body tower-http-compat?