Cargo Features

poem = { version = "2.0.0", 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", "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

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


Includes basic task execution capabilities

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

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.

multer multipart?

Enables multer

Non-feature optional dependencies

tokio-tungstenite websocket?
tokio-rustls rustls?
rustls-pemfile rustls?

Enables rustls-pemfile ^1.0.0

async-compression compression?
tower tower-compat?
chrono acme-base? cookie?
time cookie?
mime_guess embed? static-files?
rand session?
redis redis-session?

Enables redis ^0.23.0

libcookie cookie?

Enables cookie ^0.17

opentelemetry-http opentelemetry?
opentelemetry-semantic-conventions opentelemetry?
opentelemetry-prometheus prometheus?
libprometheus prometheus?

Enables prometheus

libopentelemetry opentelemetry? prometheus?

Enables opentelemetry

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?

Enables ring ^0.16.20

reqwest acme-base? acme-native-roots? acme-webpki-roots?
rcgen acme-base?

Enables rcgen ^0.11.1

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

Enables tokio-metrics


Runtime and task level metrics for Tokio applications

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

Enables quick-xml ^0.30.0

serde_yaml yaml?
tokio-stream sse?
anyhow implicit feature

Enables anyhow

Feature optional dependencies

eyre06 implicit feature

Enables eyre


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