Cargo Features

rocket = { version = "0.5.0", default-features = false, features = ["tls", "mtls", "http2", "secrets", "json", "msgpack", "uuid"] }
default = http2

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

tls mtls?

Enables tls of rocket_http

Affects config::Config.tls

mtls = tls

Enables mtls of rocket_http

Affects tls::MutualTls, rocket::mtls

http2 default

Enables http2 of rocket_http


Enables private-cookies of rocket_http

Affects config::Config.secret_key

json = serde_json

Enables io-util of tokio

Affects serde::json

msgpack = rmp-serde

Enables io-util of tokio

Affects serde::msgpack

uuid = uuid_

Enables uuid of rocket_http

Affects serde::uuid

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

serde_json json?

With default (std)

rmp-serde msgpack?
uuid_ uuid?

Enables serde and default (std) of uuid