Cargo Features

[dependencies]
poem = { version = "3.1.4", default-features = false, features = ["server", "websocket", "multipart", "rustls", "native-tls", "openssl-tls", "sse", "static-files", "compression", "tower-compat", "cookie", "session", "redis-session", "opentelemetry", "prometheus", "tempfile", "csrf", "i18n", "acme", "acme-native-roots", "acme-webpki-roots", "acme-base", "embed", "xml", "yaml", "requestid", "sonic-rs", "test", "tokio-metrics", "anyhow", "eyre06"] }
default = server

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

server default acme-base? native-tls? openssl-tls? rustls?

Enables server of hyper, rt of tokio

Affects poem::listener

websocket = base64, tokio-tungstenite

Enables rt of tokio

tokio:

Includes basic task execution capabilities

Affects error::WebSocketError, web::websocket

multipart = multer

Affects error::ParseMultipartError

rustls acme-base? = rustls-pemfile, server, tokio-rustls

Affects listener::AcceptorExt.rustls, listener::Listener.rustls, tls::IntoTlsConfigStream

native-tls = server, tokio-native-tls

Affects listener::AcceptorExt.native_tls, listener::Listener.native_tls, tls::IntoTlsConfigStream

openssl-tls = openssl, server, tokio-openssl

Affects listener::AcceptorExt.openssl_tls, listener::Listener.openssl_tls, tls::IntoTlsConfigStream

sse test? = tokio-stream

Affects web::sse

static-files = httpdate, mime_guess

Enables fs and io-util of tokio

compression = async-compression
tower-compat = tower

Enables rt of tokio

Affects error::ParseCookieError, web::cookie

session redis-session? = base64, cookie, priority-queue, rand

Enables rt of tokio

Affects poem::session

redis-session = redis, session

Affects error::RedisSessionError

opentelemetry = libopentelemetry, opentelemetry-http, opentelemetry-semantic-conventions
prometheus = libopentelemetry, libprometheus, opentelemetry-prometheus
tempfile = libtempfile

Enables fs of tokio

csrf = base64, cookie, libcsrf
i18n = fluent, fluent-langneg, fluent-syntax, intl-memoizer, unic-langid

Affects error::I18NError, poem::i18n

acme = acme-native-roots
acme-native-roots acme? = acme-base

Enables rustls-tls-native-roots of reqwest

acme-webpki-roots = acme-base

Enables rustls-tls-webpki-roots of reqwest

acme-base acme-native-roots? acme-webpki-roots? = base64, chrono, rcgen, reqwest, ring, rustls, server, x509-parser

Affects listener::acme, listener::Listener.acme

embed = hex, mime_guess, rust-embed
xml = quick-xml

Affects error::ParseXmlError

yaml = serde_yaml

Affects error::ParseYamlError

requestid

Enables uuid

sonic-rs

Enables sonic-rs

test = sse, sse-codec

Enables compat of tokio-util

Affects poem::test

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.

multer multipart?

Enables multer

Non-feature optional dependencies

tokio-tungstenite websocket?

Enables tokio-tungstenite ^0.23.1

tokio-rustls rustls?

Enables tokio-rustls ^0.25.0

rustls-pemfile rustls?
async-compression compression?
tower tower-compat?

Enables tower ^0.4.8

chrono acme-base? cookie?
time cookie?
mime_guess embed? static-files?
rand session?
redis redis-session?
libcookie cookie?

Enables cookie

opentelemetry-http opentelemetry?

Enables opentelemetry-http ^0.13.0

opentelemetry-semantic-conventions opentelemetry?

Enables opentelemetry-semantic-conventions ^0.16.0

opentelemetry-prometheus prometheus?
libprometheus prometheus?

Enables prometheus

libopentelemetry opentelemetry? prometheus?

Enables opentelemetry ^0.24.0

libtempfile tempfile?

Enables tempfile

priority-queue session?
tokio-native-tls native-tls?
tokio-openssl openssl-tls?
openssl openssl-tls?
base64 acme-base? csrf? session? websocket?
libcsrf csrf?

Enables csrf

httpdate static-files?
sse-codec test?
fluent i18n?
fluent-langneg i18n?

Enables fluent-langneg ^0.13.0

fluent-syntax i18n?
unic-langid i18n?
intl-memoizer i18n?
ring acme-base?
reqwest acme-base? acme-native-roots? acme-webpki-roots?
rcgen acme-base?

Enables rcgen ^0.12.0

x509-parser acme-base?
tokio-metrics implicit feature

Enables tokio-metrics

tokio-metrics:

Runtime and task level metrics for Tokio applications

rust-embed embed?
hex embed?
quick-xml xml?

Enables quick-xml ^0.36.1

serde_yaml yaml?
tokio-stream sse?
anyhow implicit feature

Enables anyhow

Feature optional dependencies

eyre06 implicit feature

Enables eyre

eyre:

Flexible concrete Error Reporting type built on std::error::Error with customizable Reports